I've just uploaded DBD::ODBC 1.34_3 to CPAN.

This contains experimental support for the 2 new methods odbc_getdiagrec and odbc_getdiagfield as discussed on dbi-dev and also contains native execute_for_fetch support. Support for ALL the diagnostic fields in various ODBC drivers I've tested is a little sketchy but most of the main ones people use do support SQL_DIAG_COLUMN_NUMBER which allows you to identify the bound column/parameter in error (the main reason for adding this - frew, this is your fault). There are new examples in examples/odbc_diag.pl and examples/params_in_error.pl.

I've still not received any feedback on the new execute_for_fetch support which is a lot faster than using DBI's default support so if anyone has tried it I'd love to hear about it.

Whilst implementing odbc_getdiag* I found a call to finish in DBD::ODBC which I believe is not necessary and stops odbc_getdiag* from working after a failed fetch call - this could have implications I've not thought of so you should test it.

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.

Martin

Reply via email to