http://www.perlmonks.org?node_id=138384


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