diff options
Diffstat (limited to 'lib/odbc/doc/src')
-rw-r--r-- | lib/odbc/doc/src/notes.xml | 53 | ||||
-rw-r--r-- | lib/odbc/doc/src/odbc.xml | 37 |
2 files changed, 82 insertions, 8 deletions
diff --git a/lib/odbc/doc/src/notes.xml b/lib/odbc/doc/src/notes.xml index 7ba0307a45..0110aa8e81 100644 --- a/lib/odbc/doc/src/notes.xml +++ b/lib/odbc/doc/src/notes.xml @@ -31,7 +31,58 @@ <p>This document describes the changes made to the odbc application. </p> - <section><title>ODBC 2.10.13</title> + <section><title>ODBC 2.10.14</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Under Unix enable TCP_NODELAY to disable Nagel's socket + algorithm. Thanks to Andy Richards</p> + <p> + Impact: Performance gain on Unix systems</p> + <p> + Own Id: OTP-10506</p> + </item> + <item> + <p> + Added extended_errors option to ODBC</p> + <p> + When enabled, this option alters the return code of ODBC + operations that produce errors to include the ODBC error + code as well as the native error code, in addition to the + ODBC reason field which is returned by default. Thanks to + Bernard Duggan.</p> + <p> + Own Id: OTP-10603</p> + </item> + <item> + <p>Where necessary a comment stating encoding has been + added to Erlang files. The comment is meant to be removed + in Erlang/OTP R17B when UTF-8 becomes the default + encoding. </p> + <p> + Own Id: OTP-10630</p> + </item> + <item> + <p> Some examples overflowing the width of PDF pages have + been corrected. </p> + <p> + Own Id: OTP-10665</p> + </item> + <item> + <p> + Fix aotocommit for Oracle ODBC driver in Linux. Thanks to + Danil Onishchenko.</p> + <p> + Own Id: OTP-10735</p> + </item> + </list> + </section> + +</section> + +<section><title>ODBC 2.10.13</title> <section><title>Fixed Bugs and Malfunctions</title> <list> diff --git a/lib/odbc/doc/src/odbc.xml b/lib/odbc/doc/src/odbc.xml index 8a58dc2848..a984bf4485 100644 --- a/lib/odbc/doc/src/odbc.xml +++ b/lib/odbc/doc/src/odbc.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1999</year><year>2011</year> + <year>1999</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -74,8 +74,12 @@ <code type="none"> milliseconds() = integer() >= 0 </code> <code type="none"> - common_reason() = connection_closed | term() - some kind of - explanation of what went wrong </code> + common_reason() = connection_closed | extended_error() | term() - some kind of + explanation of what went wrong </code> + <code type="none"> + extended_error() = {string(), integer(), Reason} - extended error type with ODBC + and native database error codes, as well as the base reason that would have been + returned had extended_errors not been enabled. </code> <code type="none"> string() = list of ASCII characters </code> <code type="none"> @@ -101,8 +105,14 @@ odbc_data_type() = sql_integer | sql_smallint | sql_tinyint | {sql_decimal, precision(), scale()} | {sql_numeric, precision(), scale()} | - {sql_char, size()} | {sql_wchar, size()} | {sql_varchar, size()} | {sql_wvarchar, size()}| {sql_float, precision()} | - {sql_wlongvarchar, size()} | {sql_float, precision()} | sql_real | sql_double | sql_bit | atom() + {sql_char, size()} | + {sql_wchar, size()} | + {sql_varchar, size()} | + {sql_wvarchar, size()}| + {sql_float, precision()} | + {sql_wlongvarchar, size()} | + {sql_float, precision()} | + sql_real | sql_double | sql_bit | atom() </code> <code type="none"> precision() = integer() </code> @@ -143,7 +153,7 @@ <d>All options has default values. </d> <v>option() = {auto_commit, on | off} | {timeout, milliseconds()} | {binary_strings, on | off} | {tuple_row, on | off} | {scrollable_cursors, on | off} | - {trace_driver, on | off} </v> + {trace_driver, on | off} | {extended_errors, on | off} </v> <v>Ref = connection_reference() - should be used to access the connection. </v> <v>Reason = port_program_executable_not_found | common_reason()</v> </type> @@ -196,6 +206,19 @@ <p>For more information about the <c>ConnectStr</c> see description of the function SQLDriverConnect in [1].</p> </note> + + <p>The <c>extended_errors</c> option enables extended ODBC error + information when an operation fails. Rather than returning <c>{error, Reason}</c>, + the failing function will reutrn <c>{error, {ODBCErrorCode, NativeErrorCode, Reason}}</c>. + Note that this information is probably of little use when writing database-independent code, + but can be of assistance in providing more sophisticated error handling when dealing with + a known underlying database. + <list type="bulleted"> + <item><c>ODBCErrorCode</c> is the ODBC error string returned by the ODBC driver.</item> + <item><c>NativeErrorCode</c> is the numberic error code returned by the underlying database. The possible values + and their meanings are dependent on the database being used.</item> + <item><c>Reason</c> is as per the <c>Reason</c> field when extended errors are not enabled.</item> + </list></p> </desc> </func> <func> @@ -203,7 +226,7 @@ <fsummary>Closes a connection to a database. </fsummary> <type> <v>Ref = connection_reference()</v> - <v>Reason = process_not_owner_of_odbc_connection</v> + <v>Reason = process_not_owner_of_odbc_connection | extended_error()</v> </type> <desc> <p>Closes a connection to a database. This will also |