cancel
Showing results for 
Search instead for 
Did you mean: 

Internal error during fill matrix from recordset

Former Member
0 Kudos

Hi guys,

I have a problem with sdk, I'm a beginner... During fill data into matrix SAP give me thi error:

Internal error (4011) [131-183]

This is the code that I use to populate my matrix:

' Procedo con il caricamento delle scadenze trovate in archivio

Dim oRecINV6 As SAPbobsCOM.Recordset

oRecINV6 = m_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

oRecINV6.DoQuery("SELECT DueDate, PaidToDate FROM INV6 WHERE DocEntry = " & EditText8.Value)

' Accedo ai dati

Matrix0.Clear()

For iRec As Integer = 1 To oRecINV6.RecordCount

  Dim Scadenza As String = oRecINV6.Fields.Item("DueDate").Value

  Dim DaPagare As String = oRecINV6.Fields.Item("PaidToDate").Value

  'Matrix0.AddRow(iRec + 1, iRec)

  Matrix0.AddRow()

  Matrix0.Columns.Item("dtScadenza").Cells.Item(iRec).Specific.Value = Scadenza

  Matrix0.Columns.Item("PaidToDate").Cells.Item(iRec).Specific.Value = DaPagare

  Matrix0.SetLineData(iRec)

  oRecINV6.MoveNext()

Next

I use SAP Business One Studio for Microsoft Visual Studio to create my Add On.

Thank's a lot for all!!!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

SOLVED!!!

I solved by adding a datasource to the matrix, binding with the table in datasource e put the value from my recordset!!!

thank's a lot for your indication, It was turned on a small light when you spoke of datasource!!!

former_member241304
Active Participant
0 Kudos

Hi Andrea Pallotta ,

1.If number of iterations are fixed then go to "For loop",if number of iterations are not fixed go to "While Loop"

2.Check whether u given date filed or not for your feilds(dtScadenza,PaidToDate).

  Dim Scadenza as Date=oRecINV6.Fields.Item("DueDate").Value

Dim DaPagare as Date=oRecINV6.Fields.Item("PaidToDate").Value


  Matrix0.Columns.Item("dtScadenza").Cells.Item(iRec).Specific.Value = Scadenza

  Matrix0.Columns.Item("PaidToDate").Cells.Item(iRec).Specific.Value = DaPagare


Former Member
0 Kudos

Hi Edy,

I've tried this, but I have the same problem...

I've tried to used the iteration with loop, but SAP give same error...

edy_simon
Active Contributor
0 Kudos

Hi Andrea,

what data source did you bind these columb to?

and also, remove the setlinedata

regards

edy

Former Member
0 Kudos

My datasource it's my recordset with a specific query, as the same that i put in the principal thread. I want to cicle in this recordset and populate the matrix.

edy_simon
Active Contributor
0 Kudos

Hi Andrea,

Can you try this

Dim dtScadenza as DateTime  = oRecINV6.Fields.Item("DueDate").Value

Dim dtDaPagare as DateTime = oRecINV6.Fields.Item("PaidToDate").Value

Dim Scadenza As String = dtScadenza.ToString("yyyyMMdd")

  Dim DaPagare As String = dtDaPagare.ToString("yyyyMMdd")

Regards

Edy

Former Member
0 Kudos

Hi Edy,

I've tried this, but I have the same problem...