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>


Reply via email to