Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Memory tables in DBSYS vs Delphi
Wed, Mar 18 2009 10:21 AMPermanent Link

"Halim"
The following script runs fine if run in DBSYS.
SELECT * INTO  "\MEMORY\Mem1" FROM  Play  where  "Business date"  =3D =
'2009-03-05' and transaction_status=3Dtrue ;
CREATE INDEX IF NOT EXISTS "Index_MachineID"  ON   =
"\MEMORY\Mem1"(MachineID)

However, the same script is giving me access denied error if I try to =
run it within my Delphi program.
Query1.SQL.Text :=3D   'SELECT * INTO  "\MEMORY\Mem1" FROM  Play  where  =
"Business date"  =3D '2009-03-05' and transaction_status=3Dtrue ;'+
'CREATE INDEX IF NOT EXISTS "Index_MachineID"  ON   =
"\MEMORY\Mem1"(MachineID)';
Query1.ExecSQL;

I tried to split the query in two pieces, put query1.close between the =
two but it didnt help.
Both DBSYS and my program are using DBISAM in Single/multi user mode on =
my local PC.

I need some help figuring it out.
Thank you,
-Halim






Wed, Mar 18 2009 11:20 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Halim


Remember DBSys is only a Delphi program there's no magic in it SmileySo there must be something you're doing in your app that's different (I'm assuming here that the access denied is to the memory table rather than the disk table).

Is the memory table actually created? Is there another component accessing a previous version of the table which means you can't carry out the operation?

Where is the access denied raised - as part of the SELECT INTO or as part of the CREATE INDEX?

Roy Lambert [Team Elevate]
Wed, Mar 18 2009 11:38 AMPermanent Link

"Halim"

I was able to fix the problem by setting the database property
"KeepTablesOpen" to False.
thank you for your help.
-Halim




"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:BFCDD69F-44E8-4518-B585-098A18D3E0C4@news.elevatesoft.com...
> Halim
>
>
> Remember DBSys is only a Delphi program there's no magic in it SmileySo
> there must be something you're doing in your app that's different (I'm
> assuming here that the access denied is to the memory table rather than
> the disk table).
>
> Is the memory table actually created? Is there another component accessing
> a previous version of the table which means you can't carry out the
> operation?
>
> Where is the access denied raised - as part of the SELECT INTO or as part
> of the CREATE INDEX?
>
> Roy Lambert [Team Elevate]
>
>
Image