How to connect Perl-CGI with MS SQL Server
- From: francescomoi@xxxxxxx
- Date: 4 Jan 2006 01:49:08 -0800
Hi.
With Microsoft-IIS/6.0 + CGI/1.1, I want to connect with my 'MS
SQL Server'.
My connection data are:
- user: john
- DSN: domain.com.john
- pass: xxxx
- server: db.domain.com
I'm trying with:
--------------------
use DBI;
print "Content-type: text/html\n\n";
$dbusername = 'john';
$dbpassword = 'xxxx';
$server = 'db.domain.com';
$database = 'domain.com.john';
$dbh = DBI->connect("DBI:ODBC:driver={SQL
Server};Server=$server;Database=$database;UID=$dbusername;PWD=$dbpassword")
|| die "$Error_Message $DBI::errstr";
print "OK\n";
----------------------
But it doesn't work. I've got DBI installed cause this piece of code
does work:
-----
use DBI;
print "Content-type: text/html\n\n";
print "Hello world!\n";
--------
Any suggestion? Thank you very much.
.
- Prev by Date: SQL Server and workgroup networks, how?
- Next by Date: Problem to pass UID and PWD in SQLConfigDataSource using MFC
- Previous by thread: SQL Server and workgroup networks, how?
- Next by thread: Problem to pass UID and PWD in SQLConfigDataSource using MFC
- Index(es):
Relevant Pages
|