How to get the IP address of the firebird server I'm connected to? (with Delph7 + UIB)

933 views Asked by At

I need to check, if the server I'm connecting to is local or an other PC on the LAN / VPN.
Using UIB API or SQL. (It's for data synchronization.)

Analyzing the connection string is impossible, since there are too many variation. (For example an alias, own pc name, IPv6, 127.0.0.3, ...)

select RDB$GET_Context('SYSTEM', 'CLIENT_ADDRESS'), 
       RDB$GET_Context('SYSTEM', 'DB_NAME') from RDB$DATABASE;

None of these gives back the Server IP, only the file location on the server.

0

There are 0 answers