OTL 4.0, Examples for Generic ODBC

The examples show below show how use OTL with generic ODBC data sources. There are examples with Oracle ODBC drivers, with MS SQL Server ODBC drivers, etc. By default, OTL/ODBC requires ODBC drivers to be compliant with the ODBC 3.5 specification. In order to make OTL/ODBC work with ODBC 2.5 drivers, the normal #define ODBCVER 0x0250 should be defined either by one of the header files of the C++ compiler to be used, or in the cutsom code itself, before includnig the OTL header file (for more detail on ODBC 2.5, see example 147).
  1. Example 21 (Simple Insert/Select)
  2. Example 22 ("Incompatible datatypes in stream operation" exception)
  3. Example 23 (Oracle stored procedure call)
  4. Example 24 (MS SQL Server stored procedure call)
  5. Example 25 (Implicit Select/Result Set returned by a stored procedure)
  6. Example 26 (TIMESTAMP_STRUCT and Oracle)
  7. Example 27 (TIMESTAMP_STRUCT and MS SQL Server)
  8. Example 28 (MS SQL Server and TEXT column)
  9. Example 29 (MS SQL Server and IMAGE column)
  10. Example 30 (Oracle and LONG column)
  11. Example 31 (Oracle and LONG RAW column)
  12. Example 32 (otl_stream::describe_select() with a simple Select)
  13. Example 33 (MS SQL Server: otl_stream::describe_select() and result sets)
  14. Example 34 (otl_stream and NULLs)
  15. Example 37 (otl_nocommit_stream in ODBC)
  16. Examle 40 (otl_datetime in ODBC)
  17. Example 42 (ODBC, OCI: LONG ==> CLOB. How to use OTL namespaces)
  18. Example 45 (Get Rows Processed Count in ODBC)
  19. Example 48 ("Auto-commit every SQL statement / commit-on-sucess" mode in ODBC)
  20. Example 55 (Datatype override in SELECT, MS SQL Server)
  21. Example 67 (Simple Insert/Select and otl_stream::clean() function for OTL/ODBC and MS SQL Server)
  22. Example 74 (STL std::strings, ANSI C++ typecasts, MS SQL Server)
  23. Example 77 (STL-compliant OTL/ODBC stream iterators, MS SQL Server)
  24. Example 99 (otl_value<T>, ODBC / MS SQL Server)
  25. Example 103 (#define OTL_UNCAUGHT_EXCEPTION_ON, ODBC / MS SQL Server)
  26. Example 104 (#define OTL_EXTENDED_EXCEPTION, ODBC / MS SQL Server)
  27. Example 105 (OTL/ODBC and MS SQL Server's GUIDs)
  28. Example 106 (OTL/ODBC and bulk operations with Oracle's LONG)
  29. Example 107 (OTL/ODBC and bulk operations with Oracle's CLOB)
  30. Example 108 (OTL/ODBC and bulk operations with MS SQL Server's TEXT)
  31. Example 112 (Group data type override in SELECT, MS SQL Server)
  32. Example 114 (OTL stream pooling, OTL/ODBC)
  33. Example 117 (otl_stream::set_flush(), OTL/ODBC)
  34. Example 120 (OTL_VALUE_TEMPLATE_ON, OTL_USER_DEFINED_STRING_CLASS_ON,  ODBC / MS SQL Server)
  35. Example 124 (Insert/Update/Select with MS SQL Server TEXT  in stream mode)
  36. Example 125 (Insert/Update/Select with  MS SQL Server IMAGE in stream mode)
  37. Example 128 (Insert/Update/Select with MySQL LONGTEXT  in stream mode)
  38. Example 129 (Insert/Update/Select with  MySQL LONGBLOB in stream mode)
  39. Example 131 (Describe otl_stream's bind variables for MS SQL Server)
  40. Example 147 (backward compatibility with ODBC 2.5)
  41. Example 155 (set_transaction_isolation_level, ODBC, MS SQL)
  42. Example 158 (external logon, ODBC, MS SQL)
  43. Example 160 (otl_stream::clean(), cancelling SELECT's fetch sequence, MS SQL Server)
  44. Example 163 (otl_stream::clean(), cancelling Result Set's fetch sequence, MS SQL Server)
  45. Example 165 (otl_stream::clean(), cleaning the SELECT stream's error flags, MS SQL Server )
  46. Example 168 (otl_stream::clean(), cleaning the Result Set stream's error flags, MS SQL Server )
  47. Example 170 (#define's OTL_DEFAULT_XXX_NULL_TO_VAL, MS SQL Server)
  48. Example 203 (otl_datetime container with Datetime values down to milliseconds in MS SQL Server)
  49. Example 206 (otl_exception, derived from a base class, MS SQL Server)
  50. Example 209 (MS SQL Server and VARBINARY column)
  51. Example 212 (OTL_ADD_NULL_TERMINATOR_STRING_SIZE,MS SQL Server)
  52. Example 214 (OTL_ADD_NULL_TERMINATOR_STRING_SIZE, PostgreSQL)
  53. Example 215 (OTL_ADD_NULL_TERMINATOR_STRING_SIZE, MySQL)
  54. Example 216 (OTL_ADD_NULL_TERMINATOR_STRING_SIZE, Interbase)
  55. Example 218 (otl_stream::cancel() and ODBC)
  56. Example 223 (std::string and TEXTs, MS SQL Server)
  57. Example 235 (SQL statement label, MS SQL Server)
  58. Example 237 (OTL/ODBC, accessing the system data dictionary via ODBC functions, MS SQL Server)
  59. Example 239 (OTL/ODBC, accessing the system data dictionary via ODBC functions, MS SQL Server)
  60. Example 240 (OTL/ODBC, accessing the system data dictionary via ODBC functions, MS SQL Server)
  61. Example 242 (64-bit integers (bigint), MS SQL Server, OTL/ODBC)
  62. Example 247 (user defined string class and TEXTs, MS SQL Server)
  63. Example 251 (OTL tracing, ODBC, MS SQL Server)
  64. Example 255 (Explict bind variables in SELECT statement column definitions, ODBC, MS SQL Server)

Prev NextContentsGo Home

Copyright © 1996-2017, Sergei Kuchin, email: skuchin@gmail.com, skuchin@gmail.com .

Permission to use, copy, modify and redistribute this document for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.