That's is correct - I am attempting to connect a MS SQL7 DB that is not
located on the Webserver.

Would you have some sample code that illustrates connecting to a remote
DB using either DBD::Sybase or DBD::ODBC?

Thanks for your help
NeilB

-----Original Message-----
From: Michael A Chase [mailto:[EMAIL PROTECTED] 
Sent: 24 March 2003 13:46
To: Barlow, Neil; [EMAIL PROTECTED]
Subject: Re: DBI Newbie

On Mon, 24 Mar 2003 08:37:18 -0500 Joshua Caesar <[EMAIL PROTECTED]>
wrote:

> Since Neil is running a windows box with IIS (his script is at
> Z:\InetPub\scripts\driver.pl), I think it is safe to assume that by
SQL7
> he meant MS SQL Server 7.

In which case he should be using DBD::Sybase or DBD::ODBC.  I wonder
how he decided to try using DBD::mSQL to connect instead.

> -----Original Message-----
> From: Michael A Chase [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 24, 2003 8:11 AM
> To: Barlow, Neil; [EMAIL PROTECTED]
> Subject: Re: DBI Newbie
> 
> 
> 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.

Reply via email to