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

UI: Cannot get GetLineData to work


I'm trying to read data out of a matrix through getlinedata and I keep getting same line.


I have three matrices, all are bound to the same userdatasource (actually a set of 3 overlapping ones in 3 different folders). They are filled through a SboRecordset.doquery, which is channeled through a bound suerdatasource for each column. This works actually quite fast, which was a bit of a surprise for me. btw: I never had to use setlinedata, because this appears to be implicit when you use a matrix.addrow (??) Anyway it is exactly like the example, only three-fold and re-using the userdatasources.


Now I'm trying to read the data back to sync it with the database. Even though I do a getlinedata with a different index each time, I keep getting the last added line back. So I'm trying to read lines from matrix1, but I keep getting the last line from matrix3. No matter what the index, no matter what the indicated matrix.

This is my code:

With oSboForm

Set oSboMatrix = .Items(strMatrix).Specific

Set oSboUserDataFieldCode = .DataSources.UserDataSources.Item("FieldCode")

Set oSboUserDataFieldValue = .DataSources.UserDataSources.Item("FieldValue")

For lngTeller = 1 To oSboMatrix.RowCount

oSboMatrix.GetLineData (lngTeller)

strFieldName = oSboUserDataFieldCode.Value

strValue = oSboUserDataFieldValue.Value

'do update

Select Case strStatus

Case "Insert":

'do insert

Case "Update":

'do update

End Select


End With

Now, can anyone tell me what I'm doing wrong? Is there an example of a working getlinedata somewhere (I can't find it in the examples, sapnotes or this forum). Everyone just tells you to use getlinedata, but there is no example...

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Mar 31, 2004 at 07:47 AM

    Hi Jacques,

    there are scenarios around the usage of the Matrix object where "GetLineData" always gives you the last line of a Matrix (UserDataSource?)

    Here's some bug description:

    Bug of getline data when there is more then one column that is bound to the same user data source that is changed during GetLineData.

    When this scenario occurs, the value of the data source after activation of GetLineData is not "accurate".

    This bug will be fixed in the 6.5 SP1 which will be shipped soon, ASFAIK.



    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.