Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get servername and default database from ODBC DSN?

Status
Not open for further replies.

sonname

Programmer
May 18, 2001
115
0
0
US
I'm a perl newbie so apologies if this is really simple. I have a perl script where I access a DSN. What I'd want to do is retrieve the Server Name and the default database where the ODBC DSN is pointing to? For example I have

my $sourcedb = new Win32::ODBC("DSN=$sourcedsn;")

Is there a way to get the server name and the default database that is stored in the $sourcedsn? Is there such a call?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top