Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: Access violation after calling Locate for multiple fields
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.
RE: Access violation after calling Locate for multiple fields
Posted: 2000/08/09 15:08
 
This is a bug. It will be fixed in 0.8.3.