Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Exclusive Access with Local Tables
Thu, Jul 26 2007 11:21 AMPermanent Link

Gordon Turner
I'm trying to set exclusive access to true for a local table, however
when I perform the following:

  with TEDBTable(AppDBDataMod.FindComponent(varTableName)) do
    try
      Active := False;
      Exclusive := True;
      Open;
    except
    end;

I get an error #300 Cannot lock table for exclusive access.  Since my
app is the only thing accessing the table, and I use the same session
name throughout the application (no TEDBSession components are
explicitly created although there is one in the Data Module), I'm not
sure why I can't lock the table.

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Thu, Jul 26 2007 1:27 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Gordon,

<< I get an error #300 Cannot lock table for exclusive access.  Since my app
is the only thing accessing the table, and I use the same session name
throughout the application (no TEDBSession components are explicitly created
although there is one in the Data Module), I'm not sure why I can't lock the
table. >>

Are you running the app in the IDE ?  If so, then make sure that all
instances of any EDB components that refer to that table are closed at
design-time.

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, Jul 26 2007 5:15 PMPermanent Link

Gordon Turner
Tim Young [Elevate Software] wrote:
>
> Are you running the app in the IDE ?  If so, then make sure that all
> instances of any EDB components that refer to that table are closed at
> design-time.

The table is added dynamically by the application, however there was a
query component (also added dynamically) that referred to the table.  I
explicitly set the Active property to False as I create the components.
 I tried Closing and UnPreparing the query first, but now the program
just hangs when I try to open the table exclusively.

As best I can tell, this occurs in the TEDBTable.GetHandle function in
edbcomps.pas on the following line (I don't have the ElevateDB source -
using Unicode version 1.04 b6):

Result:=Database.Handle.OpenTable(TempSchemaName, TempTableName,
FReadOnly, FExclusive);

Any suggestions?

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Fri, Jul 27 2007 10:52 AMPermanent Link

Gordon Turner
Gordon Turner wrote:
>
> The table is added dynamically by the application, however there was a
> query component (also added dynamically) that referred to the table.  I
> explicitly set the Active property to False as I create the components.
>  I tried Closing and UnPreparing the query first, but now the program
> just hangs when I try to open the table exclusively.
>
> As best I can tell, this occurs in the TEDBTable.GetHandle function in
> edbcomps.pas on the following line (I don't have the ElevateDB source -
> using Unicode version 1.04 b6):
>
> Result:=Database.Handle.OpenTable(TempSchemaName, TempTableName,
> FReadOnly, FExclusive);

Never mind. Sorry for the false alarm.  New day, computer rebooted, and
the process works fine.

--
Gordon Turner
Mycroft Computing
http://www.mycroftcomputing.com
Image