On Mon, 24 Mar 2003 03:43:20 -0800 "Barlow, Neil" <[EMAIL PROTECTED]> wrote:
> I am attempting to connect to a SQL7 DB that is on a server other than
> the webserver. I am unsure as to what the connection string will be?
Is SQL7 a new name for mSQL?
> use DBI;
>
> my $dbh = DBI->connect ("DBD:mSQL:database=<DB_NAME>;host=<HOST_NAME>",
> "<USER>", "<PWD>", {PrintError => 1}) or die "Cant connect:
> $DBD:errstr\n";
> $dbh->disconnect or warn "Connection could not terminated..\n";
> exit;
>
> I keep getting the following error?
>
> Can't connect(DBD:mSQL:database=...;host=... ... ... HASH(0x25714d0)),
> no database driver specified and DBI_DSN env var not set at
> Z:\InetPub\scripts\driver.pl line 3
The correct prefix for the DSN is 'dbi:', not 'DBD:'. The general
syntax for connect() is described in the DBI manual with driver
specific information in the manual for the particular driver.
--
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.