on 05-04-2005 5:04 AM
For Examples there're 5 or more rows in Matrix when i press add button it takes too long time about 10 seconds more. i dont know whether there's faster way. i did matrix row looping from row 1 to Matrix.rowcount to do oDocument_Lines.add .After all data add i do oDocument.add.
I know that many developers complaint about the DI Performance, but is there any way to enhance DI performance ? Thanks
Hi Hamdi,
There is a work around, If you bind the Matrix to a user defined table (It can be a blank table), and then use the oMatrix.LoadFromDatasource and oMatrix.FlushtoDatasource, you can manipulate/collect/call the data using the dbdatasource object.
This is quite fast, and I have had no problem with it, and also using a Documents object to do a goods receipt.
To recap, bound dbdatasource (blank if needed) to a usertable, use flushtodatasource and LoadFromDatasource and use dbdatasource.offset method
I attach some sample Code.
Populate your Matrix
oMatrix.FlushToDataSource()
For i = 0 To Scanindb.Size - 1
If Trim(Scanindb.GetValue(4, i)) = "No" Then
' Right we need to add the item
OITMOBject.ItemCode = Trim(Scanindb.GetValue(0, i))
OITMOBject.Manufacturer = "-1"
OITMOBject.ItemsGroupCode = "101"
OITMOBject.UserFields.Fields.Item(4).Value = Scanindb.GetValue(3, i)
OITMOBject.UserFields.Fields.Item(5).Value = Scanindb.GetValue(2, i)
ret = OITMOBject.Add
SBO_Application.MessageBox(ret)
End If
Next i
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
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.