From: [EMAIL PROTECTED] > Sure, > While looking at my code, looks like its trying to connect to > default port. I am unable to get it to connect to my port [ 1444 ], > here is the code > > #!PERl > use warnings; > use strict; > $|=1; > use DBI; > > my $user='username'; > my $password = ''pwd'; > my $database = "nnsdata_ptest"; > my $hostname='myhost.com'; > my $port = '1444'; > > my $dsn = "driver=SQL > Server;Server=$hostname;Database=$database;Port=$port"; my $dbh = > DBI->connect("DBI:ODBC:$dsn", $user, $password);
I think you are right. It seems to be ignoring the Port since if I change the $hostname, $database, $user and $password I can connect to my MS SQL even though it's on the default prompt. Seems you will have to create a server alias via Start\Programs\Microsoft SQL Server\Client Network Utility There you can specify the port. You would then use the alias you create instead of the myhost.com in $hostname. Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>