on 11-19-2012 3:25 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.