[erlang-patches] ODBC extended error information

Bernie Duggan <>
Wed Jul 25 09:44:55 CEST 2012

Hi all,
This patch adds an option to ODBC to allow for extended error reports.
The standard ODBC error reasons are, in some circumstances, not
sufficient for sophisticated error handling. Enabling the
'extended_errors' option on an ODBC connection alters the error return
type from {error, Reason} to {error, {ODBCErrorCode, NativeErrorCode,
Reason}}. The NativeErrorCode is that returned by the underlying
database and can be useful when that database type is known and
specialised error handling is desired.

I did my best to figure out how to add some tests for this change, but
from talking to a couple of other people I'm not alone in having
difficulty even getting the ODBC suite running :) Following the
instructions on the github wiki page just gives me a
port_program_executable_not_found error. I'm happy to try harder to
add some tests if someone can give me a hand with this.

You can grab the changes with

git fetch git://github.com/bernardd/otp.git odbc_extended_errors



More information about the erlang-patches mailing list