Unfortunately, updating to the latest MDAC and JET engine drivers didn't solve the problem. And other code still connects to other databases on the same database server.
I guess I'll break down and go back to a DSN connection. I hate to do this. This sort of seems like a Perl DBI problem. But, I don't know what to look for when stepping into DBI. Thanks for the suggestion. I'd appreciate hearing any other ideas. Ron -----Original Message----- From: Edward Moon [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 11, 2001 1:21 AM To: Ron Rohrssen Cc: Dbi-Users Subject: Re: DSN vs. DSNless connection This often due to something updating (or downgrading) ODBC drivers. You might want to upgrade to the latest and greatest MDAC from <http://www.microsoft.com/data/download.htm> On Wed, 10 Oct 2001, Ron Rohrssen wrote: > Hello. > > I have a piece of code that uses a DSNless connection to a SQL Server > database. This code has been working just fine until just a few hours ago. > > Suddenly, the database connection dies with this error: > Invalid string or buffer length (SQL-S1090)(DBD: db_login/SQLConnect err=-1) > > I stripped the code down to the bare minimum and still this connection will > not work. > > Even more strangely, the code WILL work on a couple of NT servers. But, the > code will not work on a Win NT workstation or Win 98 machine. Ummm.... > > If I convert the code to a DSN connection everything works fine. > > So, my question is.... > > What happened to my Perl installation that is causing this error? > > Here's the stripped down code which does not work as a DSNless connection. > ----------------------------------------- > use strict; > use DBI; > > my ($strDBServer, $dsnSQL_Server, $dbhSQL_Server); > > $dsnSQL_Server = "Driver={SQL > Server};Server=rpt-nt01;Database=DatabaseName"; > > $dbhSQL_Server = DBI->connect("dbi:ODBC:$dsnSQL_Server", "UserID", > "UserPassword", > {RaiseError => 1, PrintError => 1, AutoCommit => 1 > } ) or die "Connection to SQL Server Application Support database > failed: " . $DBI::errstr . "\n"; > > > $dbhSQL_Server->disconnect; > ----------------------------------------- > > Pretty simple. If you change the server name, databasename, userid, and > userpassword to your environment this should connect to the database and > disconnect without a problem as it does on 2 of my NT servers. > > Ron Rohrssen >
