Jenda,
    Thanks you are correct as usual. I do need to connect to MS SQL Server.
DB Stuff is a new task for me. Are there ODBC Drivers for Unix servers ?? Or
Alternative ways of accessing MS SQL from Unix servers ??
----- Original Message ----- 
From: "Jenda Krynicky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 18, 2004 6:24 PM
Subject: Re: SQL2000


> Subject: SQL2000
> > Hi all,
> >
> >  Not sure if this is the right list to ask this question but this is
> >  the best list to get answares so I am going to give it a shot. I am
> >  trying to connect to SQL2000 server from a winXP box. I keep on
> >  failing with same error, any help would be apreciate
> > d
> >
> > #!PERl
> > use warnings;
> > use strict;
> > use Net::MySQL;
>
> I thought you said SQL2000 and meant Microsoft SQL Server 2000!
>
> > use DBI;
> > $|=1;
> >
> >
> > my $user='xxx';
> > my $password = '....';
> > my $database = "nnsdata_ptest";
> > my $hostname='somehost.com;
> > my $port = '1444';
> >
> >
> > my $dsn = "host=$hostname;port=$port";
> > my $dbh = DBI->connect("DBI:mysql:$dsn", $user, $password);
>
> Again I thought you meant MS SQL Server 2000, not mysql.
> That's a completely different and totally incompatible database!
>
> You want to use DBD::ODBC, not DBD::mysql
>
> Try:
>
> my $DSN = "driver=SQL Server;Server=$hostname;Database=$database';
> my $dbh = DBI->connect("DBI:ODBC:$dsn", $user, $password);
>
> HTH, 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>
>
>
>



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to