cancel
Showing results for 
Search instead for 
Did you mean: 

Data Table - exceeds column data size [66000-148]

Former Member
0 Kudos

Hi

I have written this in FormDataEvent . On this line it is giving error

Data Table - exceeds column data size [66000-148]

Dim oForm As SAPbouiCOM.Form = Me.SBO_Application.Forms.Item(BusinessObjectInfo.FormUID)

            oForm.DataSources.DataTables.Item(0).ExecuteQuery("SELECT a.Code, a.Name,'' as Amount from [@TEMP]a")

            Dim oGrid As SAPbouiCOM.Grid = oForm.Items.Item("MyGrid").Specific

            Dim oDT As SAPbouiCOM.DataTable = oGrid.DataTable

                Dim RecSet As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

                RecSet.DoQuery("SELECT U_Code , U_Amount from [@TEMP1] where U_ID = '" & oForm.Items.Item("33").Specific.value.ToString.Trim & "'")

                Dim i As Integer

                For i = 0 To oDT.Rows.Count - 1

                    While RecSet.EoF = False

                        If oDT.GetValue("Code", i) = RecSet.Fields.Item(0).Value Then

                            oDT.SetValue("Amount", i, RecSet.Fields.Item(1).Value)

                        End If

                        RecSet.MoveNext()

                    End While

                Next

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi Sunny,

You say "on this line", which line is that ?

You probably mean this line ?

oDT.SetValue("Amount", i, RecSet.Fields.Item(1).Value)

Check the data type of the "Amount" column and its maximum size. Then check the size of RecSet.Fields.Item(1).Value

You are probably trying to insert a wrong value (for example a long value instead of an integer) or a simply too large a number.

Regards,

Johan

Answers (0)