Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Connection to a MSSQL Database

by grep (Monsignor)
on Jan 13, 2002 at 07:11 UTC ( #138384=note: print w/replies, xml ) Need Help??


in reply to Connection to a MSSQL Database

You dsn line should say "dbi:mysql:$database"

From the docs:
$dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
You can access the DBD:mysql docs by 'perldoc DBD::mysql'

You have a semicolon ending the line "dbi:ADO:$database",$user, $password); This invalidates your || die statement.

BTW unless you are using the tight binding of '||' you should use 'or'.

UPDATE: as IlyaM pointed out I misread MSSQL as mysql. Then the semicolon looks like the answer.
BTW: the docs for DBD::ADO are 'perldoc DBD::ADO'

grep
grep> cd pub grep> more beer

Replies are listed 'Best First'.
Re: Re: Connection to a MSSQL Database
by IlyaM (Parson) on Jan 13, 2002 at 07:17 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://138384]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2019-12-10 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?