Getting a database host name

Posted by jmls on 21-Apr-2011 03:08

Within the ABL. I need to be able to identify on which host and what port a connected database is residing.

I have looked into the session:startup-parameters , however that only gives me the connection data at session startup - the connected database I'm interested in may have been connected through a program, not at startup.

I've also looked at the _MyConnection, _DBStatus _Server and _Connect VST tables, but I can't seem to find the information I'm looking for.

Any clues, hints or tips ?

Ta!

All Replies

Posted by Admin on 21-Apr-2011 03:25

Any clues, hints or tips ?

MESSAGE DBPARAM ("sports2000")

VIEW-AS ALERT-BOX INFO BUTTONS OK.

Posted by jmls on 21-Apr-2011 03:30

Of course. Doh!

Thanks Mike. Now I feel really stupid ..

Posted by gus on 21-Apr-2011 13:36

However, note that if you start a session with "pro foo" then DBPARAM(1) or DBPARAM("foo") will return

-1,-db foo

and then there is no hostname.

Posted by jmls on 22-Apr-2011 00:20

Thanks Gus. In my case for the scenario I am working with, there is

always a client/server connection. I will bear it in mind, though.

This thread is closed