Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread How to get database path in a stored proc?
Mon, Nov 13 2006 1:39 PMPermanent Link

"Bern Rudisill"
I have the following stored proc

     if (AnsiCompareText(ProcedureName, 'DatabasePath') = 0) then
       begin
         with ServerSession do
           begin

ServerSession.GetRemoteDatabase(RemoteParams.ParamByName('DatabaseName')
..AsString, sDatabaseDesc, sDatabasePath);
             RemoteParams.Clear;
             RemoteParams.CreateParam(ftString,
'DatabasePath').AsString := sDatabasePath;
           end;
       end;

but sDatabasePath is always blank. How do I get the path of a database
in a stored proc?

Bern

--
Mon, Nov 13 2006 2:21 PMPermanent Link

"Bern Rudisill"
Bern Rudisill wrote:

> I have the following stored proc
>
>       if (AnsiCompareText(ProcedureName, 'DatabasePath') = 0) then
>         begin
>           with ServerSession do
>             begin
>
> ServerSession.GetRemoteDatabase(RemoteParams.ParamByName('DatabaseName
> ') .AsString, sDatabaseDesc, sDatabasePath);
>               RemoteParams.Clear;
>               RemoteParams.CreateParam(ftString,
> 'DatabasePath').AsString := sDatabasePath;
>             end;
>         end;
>
> but sDatabasePath is always blank. How do I get the path of a database
> in a stored proc?
>
> Bern

Figured this one out instead of using ServerSession I had to use
ServerEngine

--
Mon, Nov 13 2006 4:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bern,

<< Figured this one out instead of using ServerSession I had to use
ServerEngine >>

Correct.  The proper call was TDBISAMEngine.GetServerDatabase.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image