How to list the name of the server and database.(編號:3027)

How to list the name of the server and database which you are connected to. Thanks! Tools: VB6+NT4+SQL7