|
|
| Sébastien de Breuck 2005-11-22, 7:23 am |
| Is there a way to put the tempory _QSL*.dbf in an other directory than the current. This is nessary for me because I have an application on TS where the users don't have a delete authorization on that directory.
Any help will be appreciated.
Sébastien de Breuck
| |
| Marc Hamelin 2005-11-22, 7:23 am |
| > Is there a way to put the tempory _QSL*.dbf in an other directory
> than the current. This is nessary for me because I have an
> application on TS where the users don't have a delete authorization
> on that directory.
I use this code to put it in the user's temporary directory (or in C:\ if it
fails for some reasons):
if Type("DbiSetPrivateDir") <> "FP"
extern cushort DbiSetPrivateDir(cst
ring) idapi32
endif
if DbiSetPrivateDir(get
env("temp")) <> 0
DbiSetPrivateDir("C:\")
endif
| |
| Sébastien de Breuck 2005-11-22, 7:23 am |
| Marc Hamelin Wrote:
> I use this code to put it in the user's temporary directory (or in C:\ if it
> fails for some reasons):
>
> if Type("DbiSetPrivateDir") <> "FP"
> extern cushort DbiSetPrivateDir(cst
ring) idapi32
> endif
> if DbiSetPrivateDir(get
env("temp")) <> 0
> DbiSetPrivateDir("C:\")
> endif
Many thanks for your feedback, but unfortunately it doesn't works because :
Type("DbiSetPrivateDir") = "FP"
DbiSetPrivateDir(get
env("temp")) = 0
Best regards,
Sébastien de Breuck
| |
| Marc Hamelin 2005-11-22, 9:23 am |
| > Type("DbiSetPrivateDir") = "FP"
If this operation is equal to "FP", then it means that this function has
already been declared, so it should work. You probably got this result the
second time you ran the code.
> DbiSetPrivateDir(get
env("temp")) = 0
If this returns 0, then it means that the new assignation worked properly (I
only assign "C:\" if it fails for whatever reason). Therefore, the QSQL
files should now be generated in the temporary folder used by the current
user. In Windows 2000 or XP, it is usually in C:\Documents and
Settings\<username>\Local Settings\Temp\...
Try it, and see if it's working.
Hope this helps.
Marc Hamelin
| |
| Paul Van House 2005-11-22, 9:23 am |
| In article <l80DUD27FHA.1996@news-server>, m.hamelin@nospam-rasakti.com
says...
=[color=darkred]
> I use this code to put it in the user's temporary directory (or in C:\ if it
> fails for some reasons):
>
C: is not accessible in the default installation of XP for non-
administrative users. (Or at least it did not used to be)
You can also get the "temp" folder by using
GetEnv('temp')
--
Paul Van House
remove ".removeme" for e-mail replies
Radio/TV Software and Baseball Stat Software:
http://www.binxsoftware.com
Family Home Page: http://vanhouse.binxsoftware.com
Church Home Page: http://www.ashfordumc.org
| |
| *Lysander* 2005-11-22, 11:23 am |
| In article <jUGLJ407FHA.1520@news-server>, s_de_breuck@hotmail.com=20
says...
> where the users don't have a delete authorization on that directory.
The advice you received is excellent... wish I would have known about=20
this external function years ago... :)
For me it was working pretty good to add another routine to my=20
housekeeping functions. Housekeeping should be done by an admin- or=20
system-account in any case.
Add a function to delete all _qsql-files every couple of days.
If you do not have any house-keeping function at all until now (shame on=20
you *g*) you can also use usual windows/DOS-scripts and possibly put=20
them into the windows-scheduler.
--=20
ciao,
Andr=E9
| |
| Christopher F. Neumann 2005-11-22, 8:23 pm |
| Trying it I get 2 paradox locks in the temp directory and the _QSQL still appears in the default application directory.
--
Christopher F. Neumann
[dBASE Gold Charter Member 107]
Blue Star Visual dBASE graduate
IWA-HWG Web Technologies Certified
IWA-HWG Web Programming Certified
ICCP TCP/IP Network Analyst
Data Communications Engineer
http://cfneumann.us
"Just hanging out on the Sagittarian arm of the Milky Way"
Paul Van House wrote:
> In article <l80DUD27FHA.1996@news-server>,
> m.hamelin@nospam-rasakti.com says...
> =
>
>
> C: is not accessible in the default installation of XP for non-
> administrative users. (Or at least it did not used to be)
>
> You can also get the "temp" folder by using
> GetEnv('temp')
|
|
|
|