Hi Jenda,
Thanks for your info~ it wasn't on the book any where? =)
as for DSN lookup I have my own code to search for available drivers
^^
Eric
#begin code################################################
#!d:\perl\bin\perl.exe -w
#This tool is used to check for connection strings to the
#available database
use DBI;
my @drivers = DBI->available_drivers();
die "No drivers found!\n" unless @drivers;
foreach my $driver (@drivers){
print "Driver: $driver \n";
my @dataSources = DBI->data_sources ($driver);
foreach my $dataSource (@dataSources){
print "\tData Source is $dataSource\n";
}
print "\n";
}
exit;
#End Code#
On Thu, 13 Jun 2002, Jenda Krynicky wrote:
> From: learn perl <[EMAIL PROTECTED]>
> > Thanks, that's what I thought of doing. But is there a way to connect
> > to the remote database (MS SQL server) w/o going thru DSN?
>
> $db = DBI->connect( 'DBI:ODBC:Driver=SQL Server;
> Server=The_name_or_IP_of_Server;
> Database=DatabaseName');
>
> You can add some other options. I do not know the list, but if you
> find the option in the DSN manager and set it for a DSN you can look
> up the name in registry under HKLM\SOFTWARE\ODBC\ODBC.INI\<DNSname>
>
> HTH, Jenda
> =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
> There is a reason for living. There must be. I've seen it somewhere.
> It's just that in the mess on my table ... and in my brain
> I can't find it.
> --- me
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]