IP-Address of the Database-Server from Client

WolfStone

New Member
Is there a way to get the IPAddress of the Databaseserver from an 4GL Client?

I looked for Session Paramterers and Hidden Tables but there is not the ServerIP

thx
WolfStone
 
Do you know the name of the server? If so, you can ping/trace the name and parse the output from OS-COMMAND.
 
No I dont know the Server-Name

I Think there are 2 ways to get that:
-Session:Startup-Parameters indikates the -H Parameter !!!
-DB-REMOTE-HOST function but I have never set the ipver Parameter.

Any other?

Ahhh--- DBParam ist noch besser :-)
 
Hi, this code return the command line that started the current session.

P18054 Why does the DBPARAM() function NOT return all the command line startup parameters?

Code:
DEFINE VARIABLE chrCommandLine AS CHARACTER NO-UNDO FORMAT "X(128)".
DEFINE VARIABLE ptrToString    AS MEMPTR    NO-UNDO.


PROCEDURE GetCommandLineA EXTERNAL "KERNEL32.DLL":
    DEFINE RETURN PARAMETER ptrToString AS MEMPTR.
END PROCEDURE.


RUN GetCommandLineA (OUTPUT ptrToString).


DEFINE VARIABLE i AS INTEGER    NO-UNDO.
ASSIGN chrCommandLine = GET-STRING(ptrToString,1).


MESSAGE chrCommandLine
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
SET-SIZE(ptrToString) = 0.

Regards.
 
Back
Top