MikeBronner
Programmer
Hi there,
What I am looking for is pretty specific: a dsn-less connection string to a mssql database. I have all ther pertinent information, however, I can't get it to work. For hypothetical purposes, I am using the following information:
Driver: SQL Server
Server: mssql.host.com
Database: TestDB
User: MyUser
Password: MyPass
What I'm using right now looks like this:
$dsn = 'driver=SQL Server;server=mssql.host.com;database=TestDB;uid=MyUser;pwd=MyPass;';
$dbh = DBI->connect("dbi:ODBC:$dsn"
or die DBI->errstr;
However, when I execute this, I get a 'silent' failure; the scripts stops without any error message and worst of all without connecting. Can anyone point out what I am doing wrong?
Thanks! Take Care,
Mike
What I am looking for is pretty specific: a dsn-less connection string to a mssql database. I have all ther pertinent information, however, I can't get it to work. For hypothetical purposes, I am using the following information:
Driver: SQL Server
Server: mssql.host.com
Database: TestDB
User: MyUser
Password: MyPass
What I'm using right now looks like this:
$dsn = 'driver=SQL Server;server=mssql.host.com;database=TestDB;uid=MyUser;pwd=MyPass;';
$dbh = DBI->connect("dbi:ODBC:$dsn"
However, when I execute this, I get a 'silent' failure; the scripts stops without any error message and worst of all without connecting. Can anyone point out what I am doing wrong?
Thanks! Take Care,
Mike