Re: Re: DBD::ADO howto avoid "SET FMTONLY ON..." when using placeholders.

Re: Re: DBD::ADO howto avoid "SET FMTONLY ON..." when using placeholders.

am 05.04.2006 10:53:32 von opoulet

>> I am preparing a statement like this:
>> my $sql=3D< >> UPDATE text_table
>> SET uni_text =3D ?
>> WHERE uni_id =3D $ {uni_id}
>> EOF
>>=20
>> my $sth =3D $dbh->prepare($sql);
>>=20
>> This runs the following in SQL Server:
>> SET FMTONLY ON SELECT uni_text FROM text_table SET FMTONLY OFF
>
>Out of curiosity, how can I inspect this?

I trapped this through SQL's profiler

>_refresh() method. The latter is called if the former fails. You
>can avoid trying to call Refresh() with the 'ado_refresh' attribute:
>
> $sth =3D $dbh->prepare( $sql, { ado_refresh =3D> 2 } );
>

I'll try and keep you informed.

--=20
Olivier.