on 10-21-2008 7:42 AM
Hi m getting an error : row index
can anybody help...
Thanks
hi,
use this code
for j As Integer = 1 to RecSet.Recordcount
If RecSet.EoF = False Then
oMatrix.AddRow()
oEdit = oMatrix.Columns.Item("LCode").Cells.Item(j).Specific
oEdit.String = RecSet.Fields.Item(2).Value
oEdit = oMatrix.Columns.Item("LName").Cells.Item(j).Specific
oEdit.String = RecSet.Fields.Item(3).Value
End If
RecSet.MoveNext()
next
regards,
varma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
not much information
maybe you access a wrong row - in a matrix the firstrow-index is 1
be sure that when you use a variable that it has the correct type - in c# int32
if you mean something else post more details.
lg David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pari,
Can you give more details for your error if you want some quickly response ?
Post your code and explain where the error appears in witch event.
Thanks
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using this function with formatted search...when if recordsetset.eof=false...on very next line it gives row index error........
Private Sub DoGetData(ByVal Code As String, ByVal iRow As Integer, ByRef oForm As SAPbouiCOM.Form)
Dim RecSet As SAPbobsCOM.Recordset
Dim QryStr As String
Dim oEdit As SAPbouiCOM.EditText
Dim oMatrix As SAPbouiCOM.Matrix
Try
RecSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
QryStr = "SELECT [@ENTITLEMENTHEAD].Code, [@ENTITLEMENTHEAD].Name, [@ELHEADDETAILS].U_LCode, [@ELHEADDETAILS].U_LDesc, [@ENTITLEMENTHEAD].U_Earning FROM [@ELHEADDETAILS] INNER JOIN [@ENTITLEMENTHEAD] ON [@ELHEADDETAILS].U_HeadCode = [@ENTITLEMENTHEAD].Code where [@ENTITLEMENTHEAD].Code='" & Code & "'"
RecSet.DoQuery(QryStr)
oMatrix = oForm.Items.Item("Detail").Specific
' oMatrix.Clear()
oMatrix.LoadFromDataSource()
Dim j As Integer = iRow
If RecSet.EoF = False Then
oEdit = oMatrix.Columns.Item("LCode").Cells.Item(j).Specific
oEdit.String = RecSet.Fields.Item(2).Value
oEdit = oMatrix.Columns.Item("LName").Cells.Item(j).Specific
oEdit.String = RecSet.Fields.Item(3).Value
oMatrix.AddRow(1, -1)
j = j + 1
RecSet.MoveNext()
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End Sub
User | Count |
---|---|
89 | |
7 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.