Mur
User
 Platinum Boarder
| Posts: 116 |   | Karma: 0 |
|
Access violation after calling Locate for multiple fields
|
|
Posted: 2000/08/07 09:30 |
|
|
|
|
Function call Qu.Locate('IS_ITEM;ID', VarArrayOf([0,Id]),[]); goes fine when it is called first time. On second call to Locate with the same FieldList, I got access violation. The problem is in function TOCIFilter.PrepareLookupFilter (NcOCIFilter.pas). On second call FKeyFields becomes equal AKeyFields and buggy code is being executed. Workaround for this problem is to clear FKeyFields field before calling Locate. The only way to do this which I found, is calling Locate for something unneeded, for example Qu.Locate('ROWID', Variant(''),[]); and after that do actual locate.
|
|