On 07/10/10 10:48, Tim Bunce wrote:
> Try r14463 :)
> 
> Tim.
> 
> p.s. The redundant FETCH has been happening for years.
> 

Did not see your checkin until after I posted the other mail.

You obviously addressed the profile issues.

This all works lovely for me now. Wish I'd put more effort into looking at it 
when I first saw it but I just noted it down and forgot about it.

Thanks again Tim.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

> On Wed, Oct 06, 2010 at 07:15:03PM +0100, Martin J. Evans wrote:
>>  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