Session.PrivateDir + Service


2003-12-10 10:05:45 PM
off-topic12
Hi All,
This is a bit of a repost as I realised this should be in here and probably
not in the Database destop section ;)
Ok here's my problem
I'm having a bit of a problem with a Dll that is used within a Service app
that uses the DLL for data access etc.
The DLL has a initialisation procedure that is called right away
(STG_DLLInit)
to setup the various settings including the BDE PrivateDir.
The PrivateDir is set to a uniquely named folder and Session.PrivateDir is
set to point to it.
I've commented out all code apart from this one procedure so there are no
other
BDE components or datamodules etc active in the DLL, so its just basically
1 procedure with 1 line of code in it
The Problem is as soon as set the Session.PrivateDir I get a exception
raised "Exception raised in STG_DLLInit: Path not found.File: PDOXUSRS.NET"
The Net File is specified correctly via the BDE Config, but I'm not sure
why changing the PrivateDir would cause this error anyway?
The service has Administrator rights by setting the LogOn in Service
Properties to my user account so rights shouldn't be an issue?
To add a further twist to the problem, the Service app can be run as a
Console app in a Dos
window and it works perfectly, no errors and works as expected?
So any ideas why running the app as a service causes the BDE to kick up a
PDOXUSR.NET not found when run as a console it works fine?
Thanks for any suggestions in advance as this has me foxed!
Cheers
Chris Hedges