Connect to a remote MS SQL database
- From: jordanmueller@xxxxxxxxx (Jordan Mueller)
- Date: Wed, 24 Jan 2007 16:55:06 -0500
Hello,
** First time posting, please excuse possible novice mistakes **
SETUP:
web server: win 32 Apache running on a windows 2003 server machine,
activePerl
database: MS SQL hosted on a separate windows server at my organization.
PROBLEM:
I cannot get my $dbh -> connect() line to work.
I have spent all day reading different documentation for DBI and DBD::ODBC,
as well as
different websites, and I can't make a connection.
Does anyone have experience with these Microsoft beasts?
Here is the sample code that I have hobbled together from different docs:
++++++++++++++++++++++++++++++++++++++++++++++++++++
use DBI;
use strict;
use diagnostics;
my $data_source = 'driver={SQL Server};Server=<server_name>;
database=<database_name>;uid=<username>;
pwd=<passwrd>;';
my $dbh = DBI->connect("dbi:ODBC:$data_source") or die "$DBI::errstr";
++++++++++++++++++++++++++++++++++++++++++++++++++++
I do not have the errors, because I do not have read access to the error
logs right now, and
CGI::carp is not working correctly.
Also, I checked and ODBC is listed as an available driver for DBI.
I would appreciate if anyone has some light to shed on the problem.
Thank you,
Jordan Mueller
Data Manager
Brigham and Women's Hospital
- Follow-Ups:
- RE: Connect to a remote MS SQL database
- From: Brian D Campbell
- Re: Connect to a remote MS SQL database
- From: Eriam Schaffter
- RE: Connect to a remote MS SQL database
- Prev by Date: PPM hanging when installing DBD-Oracle
- Next by Date: Re: DBD::Oracle: Row cache fetch ahead on cursor returned from PL/SQL stored proc?
- Previous by thread: PPM hanging when installing DBD-Oracle
- Next by thread: Re: Connect to a remote MS SQL database
- Index(es):
Relevant Pages
|