On 06-Jan-2003 Jeff Thies wrote:
> Jeff Urlwin wrote:
>>
>> That's probably an old bug in DBD::ODBC, and I suspect you're using
>> version 0.28. If so, please upgrade. If not, please post more
>> specifics about your version.
>
> Just installed it last week (ppm) and have been running Access on it
> (ugh!). I would think that would be 1.01 .
>
> How do I tell? Printing $DBD::ODBC::VERSION yields nothing, but I'm
> tired and may have done that wrong.
>From a DOS prompt type:
perl -e "use DBD::ODBC;print $DBD::ODBC::VERSION,'\n';"
BTW, SQLConnect (the ODBC 1.0 function DBD::ODBC can use) has a limit on the
size of the string you can pass in the first argument (I think it is 32).
DBD::ODBC used to get around this by looking for "DSN=" at the start of the
string and using SQLDriverConnect instead. I'm not sure without examining the
source again that a connection string starting with "DRIVER=" will go to
SQLDriverConnect (which it needs to).
Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development
>>
>> >
>> >
>> > I'm trying to get a connect with SQL Server.
>> >
>> > I have this:
>> >
>> > $DSN = 'driver={SQL
>> > Server};Server=server_ip;uid=user_id;pwd=the_password;database
>> > =database_name';
>> >
>> > $db = DBI -> connect("dbi:ODBC:$DSN") || die "Cannot Connect:
>> > $DBI::errstr\n";
>> >
>> > This is what I get:
>> >
>> > Cannot Connect: [Microsoft][ODBC Driver Manager] Invalid
>> > string or buffer length (SQL-S1090)(DBD: db_login/SQLConnect err=-1)
>> >
>> > Now what?
>> >
>> > Jeff
>> >