>is it possible to retrieve the server name or ip
>from a Connection or a Statement
>from the package java.sql.
>thank you in advance
Try Driver.getPropertyInfo and dig around to see what is in there.
I gather you have already pawed through Connection.getMetaData
Perhaps you can get an URL and from that a name and from that an IP.
See http://mindprod.com/jgloss/uri.html
http://mindprod.com/jgloss/ip.html
Another approach is to save the url when you are constructing your
connect string rather than trying to extract it later.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
dnasmars - 29 Sep 2005 11:08 GMT
>>is it possible to retrieve the server name or ip
>
[quoted text clipped - 13 lines]
> Another approach is to save the url when you are constructing your
> connect string rather than trying to extract it later.
thank you for the information I'll try
and will let you all know :)