Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: BDE Windows 7 and Query - directory permission


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 3 - Last Post: May 8, 2015 5:34 AM Last Post By: jason chapman
John MacDonald

Posts: 179
Registered: 3/22/98
BDE Windows 7 and Query - directory permission  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 17, 2015 11:47 AM
Hello Everyone:

In the middle of moving an application to XE6. The query component is coming up with a directory permission issue.

When I use "Order By" in my sql statement I assume the BDE has to make a temporary index file.
It is trying to put it in c:\windows\system32\_QSQL000.dbf

I believe that Windows does not allow this type of action for our own good.

How do I reconfigure to a directory that windows will allow?

John
Martin Buchmajer

Posts: 2
Registered: 7/27/00
Re: BDE Windows 7 and Query - directory permission
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 21, 2015 2:18 AM   in response to: John MacDonald in response to: John MacDonald
Hello John,
try set TQuery.DatabaseName:='directory where is your database' before open
TQuery.

Example :
Query1.Close;
Query1.DatabaseName:='C:\MyApplication\';
Query1.SQL.Clear;
Query1.SQL.Text:='SELECT * FROM "mydatabase.db"';
Query1.Open;

Martin B.

<John MacDonald> pí¹e v diskusním pøíspìvku
news:714717 at forums dot embarcadero dot com...

Hello Everyone:

In the middle of moving an application to XE6. The query component is
coming up with a directory permission issue.

When I use "Order By" in my sql statement I assume the BDE has to make a
temporary index file.
It is trying to put it in c:\windows\system32\_QSQL000.dbf

I believe that Windows does not allow this type of action for our own
good.

How do I reconfigure to a directory that windows will allow?

John
John MacDonald

Posts: 179
Registered: 3/22/98
Re: BDE Windows 7 and Query - directory permission  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 22, 2015 5:00 PM   in response to: Martin Buchmajer in response to: Martin Buchmajer
Thanks for the response.

I am using the BDE ( so far ). This means that we use the database alias used for the bde.
That's why I was trying to set this in the BDE.

I will still play with the setting directly in my application and then use the query after.

I'll let you know if this resets it.

Thanks again

Martin Buchmajer wrote:
Hello John,
try set TQuery.DatabaseName:='directory where is your database' before open
TQuery.

Example :
Query1.Close;
Query1.DatabaseName:='C:\MyApplication\';
Query1.SQL.Clear;
Query1.SQL.Text:='SELECT * FROM "mydatabase.db"';
Query1.Open;

Martin B.

<John MacDonald> pí¹e v diskusním pøíspìvku
news:714717 at forums dot embarcadero dot com...

Hello Everyone:

In the middle of moving an application to XE6. The query component is
coming up with a directory permission issue.

When I use "Order By" in my sql statement I assume the BDE has to make a
temporary index file.
It is trying to put it in c:\windows\system32\_QSQL000.dbf

I believe that Windows does not allow this type of action for our own
good.

How do I reconfigure to a directory that windows will allow?

John

--
JMAC out
jason chapman

Posts: 3
Registered: 10/14/99
Re: BDE Windows 7 and Query - directory permission  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 8, 2015 5:34 AM   in response to: John MacDonald in response to: John MacDonald
I would imagine this is the going to be the "private" directory, rather
thant the "working" directory that Martin is referring to.

Before any DB access (i.e. with no connections active), you need to set:

session.PrivateDir:=thePrivDir; // only this app shoudl have access
to this

session.NetFileDir:=theLocalTempRoot; // this should be a comon path
to the same place for any application concurrently using this data.

HIH
JAC

John MacDonald wrote:

Thanks for the response.

I am using the BDE ( so far ). This means that we use the database alias used for the bde.
That's why I was trying to set this in the BDE.

I will still play with the setting directly in my application and then use the query after.

I'll let you know if this resets it.

Thanks again
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02