Board index » delphi » Object not locked error

Object not locked error

Has anyone else received an 'Object not locked' error?  All I'm trying
to do is create a Primary index on a Paradox table (D3 BDE4).  The code
I've written is:

with DataModule.TblTopDog do
begin
  Exclusive := True;
  Open;
  AddIndex( 'SubID', 'SubscriberID', [ixPrimary] );
  ** error occurs after line above **
  AddIndex( 'CSIDIX', 'CSID', [] );
  AddIndex( 'ServiceIDIX', 'ServiceID', [] );
  AddIndex( 'SubscriberNameIX', 'SubscriberName', [] );
  Exclusive := False;
end;

and the actual error I get is:

'EDBEngineError 'Object not locked. Index does not exist. Index :
SubID'

Anyone have any ideas?

Derek Davidson

 

Re:Object not locked error


On Tue, 03 Jun 1997 13:28:37 EDT, Derek Davidson <de...@mksoft.com>
wrote:

No, i don't get this error with BDE4 installed. You have to close the
table before set exclusive to false.

Quote
>Has anyone else received an 'Object not locked' error?  All I'm trying
>to do is create a Primary index on a Paradox table (D3 BDE4).  The code
>I've written is:

>with DataModule.TblTopDog do
>begin
>  Exclusive := True;
>  Open;
>  AddIndex( 'SubID', 'SubscriberID', [ixPrimary] );
>  ** error occurs after line above **
>  AddIndex( 'CSIDIX', 'CSID', [] );
>  AddIndex( 'ServiceIDIX', 'ServiceID', [] );
>  AddIndex( 'SubscriberNameIX', 'SubscriberName', [] );
   Close;
>  Exclusive := False;
>end;

>and the actual error I get is:

>'EDBEngineError 'Object not locked. Index does not exist. Index :
>SubID'

>Anyone have any ideas?

>Derek Davidson

-------------------------------
mailto p...@singular.singular.gr
http://www.singular.gr

Other Threads