Imports DevExpress.XtraGrid Public Class frmDocTest Private Sub DocTest_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try Dim oControlPatcher = New ClassControlPatcher(Of GridControl)(Me) oControlPatcher. ProcessContainer(AddressOf ClassGridControl.DefaultGridSettings). ProcessContainer(AddressOf ClassGridControl.ReadOnlyGridSettings) Dim oSQL = "SELECT * FROM VWICM_DOC_METADATA_DE" My.Channel.CreateDatabaseRequest("Load Doc Values", True) Dim oResult = My.Channel.ReturnDatatable(oSQL) If Not oResult.OK Then MsgBox(oResult.ErrorMessage) Exit Sub End If My.Channel.CloseDatabaseRequest() Dim oDatatable As DataTable = oResult.Table txtDoctype.DataBindings.Add(New Binding("Text", oDatatable, "DOCTYPE")) txtDocId.DataBindings.Add(New Binding("Text", oDatatable, "DOC_ID")) GridControl1.DataSource = oDatatable Catch ex As Exception _ErrorHandler.ShowErrorMessage(ex) End Try End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim oDocId As Int64 = Int64.Parse(txtDocId.Text) Dim oValue As String = txtDoctype.Text Dim oSyskey As String = "001-DOCTYPE" Dim oSQL = $"SELECT FNICM_NEW_DOC_VALUE({oDocId}, '{oSyskey}', '{My.Application.User.Language}', '{My.Application.User.UserName}', '{oValue}') FROM RDB$DATABASE;" My.Channel.CreateDatabaseRequest("Save Doc Value", True) Dim oResult = My.Channel.ReturnScalar(oSQL) If Not oResult.OK Then MsgBox(oResult.ErrorMessage) Exit Sub End If My.Channel.CloseDatabaseRequest() End Sub End Class