On Fri, Feb 03, 2012 at 08:51:10PM +0000, 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=>0x00000004 });
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.