on 03-25-2004 3:56 PM
Hi,
I'm trying to read data out of a matrix through getlinedata and I keep getting same line.
Situation:
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.
Problem:
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
Next
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...
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.
Regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
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.