Hi,

Hoping someone can help me identify what might be going on here but it looks to me like something in DBI has changed.

use strict;
use DBI;

my $attrs = { RaiseError => 1, PrintError => 0, AutoCommit => 1 };
my $h = DBI->connect("dbi:ODBC:DSN=xxx","xx","xx", {odbc_SQL_ROWSET_SIZE => 2});

This code used to work fine but now it fails with:

Option type out of range (SQL-HY092) at /home/martin/perl5/lib/perl5/i486-linux-gnu-thread-multi/DBI.pm line
720.

It appears FETCH is being called on odbc_SQL_ROWSET_SIZE (just my example, could just as easily have been 9 for the actual ODBC SQL_ROWSET_SIZE attribute) and this ends up calling SQLGetConnectOption which says you cannot fetch SQL_ROWSET_SIZE. It is permissible to set SQL_ROWSET_SIZE with SQLSetConnectOption but not to retrieve it back.

Why does DBI do a FETCH on the attribute when it is never retrieved in the script? I don't think it used to (perhaps a long time ago).

Martin

Reply via email to