Skip to Content
author's profile photo Former Member
Former Member

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


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


End While



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Nov 20, 2012 at 10:44 AM

    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.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.