Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Database Directory path when running from ISAPI
Mon, Jul 3 2006 4:51 AMPermanent Link

"Steve McGrath"
Hi,

I'm using an ISAPI dll to access a DBISAM database. The DBISAM files are in
a subfolder under the dll called '/data'. I know this is more of a general
ISAPI question but who do I code the data folder without having to hard code
the entire path. If I use the following code:

DBISAMDatabase1.Directory:='.\data\';

it will fail when run under IIS. However it works fine when debugging under
a simple web server standalone exe (wwwserver.exe availbale from kbmMW).

Using IIS I have to hard code the entire path to get it to correctly point
at the database folder:

DBISAMDatabase1.Directory:='d\inetpub\scripts\data';

Has anyone been able to workaround this when using IIS?

Thanks,
Steve

Mon, Jul 3 2006 5:18 AMPermanent Link

"Ralf Mimoun"
Steve McGrath wrote:
> Hi,
>
> I'm using an ISAPI dll to access a DBISAM database. The DBISAM files
> are in a subfolder under the dll called '/data'. I know this is more
> of a general ISAPI question but who do I code the data folder without
> having to hard code the entire path.

I'd use the registry.

Ralf
Mon, Jul 3 2006 5:36 AMPermanent Link

"Robert Cram"
Hi Steve,

You can use the "GetModuleFileName" function in your code (using
hInstance), extract the path, and add the "data" directory. It works
for me.

HTH,
Robert.



Steve McGrath wrote:

> Hi,
>
> I'm using an ISAPI dll to access a DBISAM database. The DBISAM files
> are in a subfolder under the dll called '/data'. I know this is more
> of a general ISAPI question but who do I code the data folder without
> having to hard code the entire path. If I use the following code:
>
> DBISAMDatabase1.Directory:='.\data\';
>
> it will fail when run under IIS. However it works fine when debugging
> under a simple web server standalone exe (wwwserver.exe availbale
> from kbmMW).
>
> Using IIS I have to hard code the entire path to get it to correctly
> point at the database folder:
>
> DBISAMDatabase1.Directory:='d\inetpub\scripts\data';
>
> Has anyone been able to workaround this when using IIS?
>
> Thanks,
> Steve



--
Mon, Jul 3 2006 7:07 AMPermanent Link

"Steve McGrath"
Robert,

This works a treat,

Thanks,
Steve

"Robert Cram" <rcram@knoware.nl> wrote in message
news:xn0eoa91e2opkze000@news.elevatesoft.com...
> Hi Steve,
>
> You can use the "GetModuleFileName" function in your code (using
> hInstance), extract the path, and add the "data" directory. It works
> for me.
>
> HTH,
> Robert.

Image