Re: New DBD::ODBC 1.34_3 development release

2012-02-05 Thread Martin J. Evans

On 04/02/2012 20:51, Tim Bunce wrote:

On Fri, Feb 03, 2012 at 08:51:10PM +, Martin J. Evans wrote:

You should also be aware that calling odbc_getdiag* will clear DBI's
err, errstr and state so if you want DBI's methods to return
something meaningful you may need to call them first - I'm unsure if
I can stop this behaviour.

You can. You need to pass some extra args to install_method().

Something like install_method(odbc_getdiagrec, { O=0x0004 });

That's the value of the IMA_KEEP_ERR flag.  See the #define IMA_*'s in
DBI.xs and the O=... in DBI.pm

Tim.

Thanks,

I've made that change, checked it and uploaded DBD::ODBC 1.34_4.

Martin


Re: New DBD::ODBC 1.34_3 development release

2012-02-04 Thread Tim Bunce
On Fri, Feb 03, 2012 at 08:51:10PM +, Martin J. Evans wrote:
 
 You should also be aware that calling odbc_getdiag* will clear DBI's
 err, errstr and state so if you want DBI's methods to return
 something meaningful you may need to call them first - I'm unsure if
 I can stop this behaviour.

You can. You need to pass some extra args to install_method().

Something like install_method(odbc_getdiagrec, { O=0x0004 });

That's the value of the IMA_KEEP_ERR flag.  See the #define IMA_*'s in
DBI.xs and the O=... in DBI.pm

Tim.