OTL 4.0, Examples for DB2 CLI

The examples below work with DB2  / CLI. In general, all of these examples should work with any DB2 version 6.1 and higher, when DB2 CLI  is enabled in OTL by setting #define OTL_DB2_CLI
  1. Example 89 (Simple Insert/Select/Update)
  2. Example 90 ("Incompatible datatypes in stream operation" exception)
  3. Example 91 (otl_datetime container and DATE/TIME/TIMESTAMP table columns)
  4. Example 92 (otl_long_string container and CLOB column)
  5. Example 93 (otl_long_string container and BLOB column)
  6. Example 94 (std::string and STL-compliant stream iterators)
  7. Example 95 (otl_stream::describe_select() with a simple Select)
  8. Example 96 (otl_stream and NULLs)
  9. Example 100 (otl_value<T> / otl_compact_value<T,null> / std::optional<T>, DB2-CLI)
  10. Example 109 (OTL/DB2-CLI and bulk operations with DB2's CLOB)
  11. Example 115 (OTL stream pooling, DB2-CLI)
  12. Example 118 (otl_stream::set_flush(), DB2-CLI)
  13. Example 121 (OTL_VALUE_TEMPLATE_ON, OTL_USER_DEFINED_STRING_CLASS_ON, DB2-CLI)
  14. Example 126 (Insert/Update/Select with DB2 CLOB  in stream mode)
  15. Example 127 (Insert/Update/Select with DB2 BLOB in stream mode)
  16. Example 132 (Describe otl_stream's bind variables for DB2)
  17. Example 154 (set_transaction_isolation_level, DB2-CLI)
  18. Example 157 (external logon, DB2-CLI)
  19. Example 161 (otl_stream::clean(), cancelling SELECT's fetch sequence, DB2 )
  20. Example 166 (otl_stream::clean(), cleaning the SELECT stream's error flags, DB2 )
  21. Example 171 (#define's OTL_DEFAULT_XXX_NULL_TO_VAL, DB2)
  22. Example 202 (otl_datetime container with TIMESTAMP values down to microseconds in DB2)
  23. Example 207 (otl_exception, derived from a base class, DB2)
  24. Example 213 (OTL_ADD_NULL_TERMINATOR_STRING_SIZE, DB2)
  25. Example 217 (otl_stream::cancel() and DB2-CLI)
  26. Example 224 (std::string and CLOBs, DB2)
  27. Example 236 (SQL statement label, DB2)
  28. Example 238 (OTL/DB2-CLI, accessing the system data dictionary via DB2 CLI functions, DB2)
  29. Example 243 (64-bit integers, DB2, OTL/DB2-CLI)
  30. Example 248 (user defined string class and CLOBs, DB2)
  31. Example 252 (OTL tracing, DB2 CLI)
  32. Example 256 (Explict bind variables in SELECT statement column definitions, DB2)
  33. Example 264 (OTL stream read iterator, simple SELECT, DB2 CLI)
  34. Example 290 (Strict numeric type checking on SELECTs)
  35. Example 309 (Stream buffer size as int, simple Insert/Select)
  36. Example 319 (Insert/Update/Select with DB2 CLOB  in stream mode and otl_stream_read_iterator)
  37. Example 320 (Insert/Update/Select with DB2 BLOB  in stream mode and otl_stream_read_iterator)
  38. Example 340 (OTL stream read iterator, "get by name" functions, DB2 CLI)
  39. Example 373 (Simple Insert/Select, otl_connect::operator<<, <<=, >>)
  40. Example 380 (Insert/Update/Select, DB2 CLOBs in stream mode, and std:strings)
  41. Example 387 (Insert/Update/Select with DB2 CLOB  in stream mode, without otl_lob_stream::set_len())
  42. Example 388 (Insert/Update/Select with DB2 BLOB in stream mode, without otl_lob_stream::set_len())
  43. Example 471 (DB2, stored procedure with output parameters and a return code)
  44. Example 472 (Insert/Implicit Result Set (Stored Proc)/Update)
  45. Example 671 (XML as varchar_long/otl_long_string on SELECT, and varchar_long/otl_long_string on INSERT)
  46. Example 672 (XML as varchar_long/std::string  on SELECT and varchar_long/std::string on INSERT)
  47. Example 694 (Customizing the date format in OTL tracing via #define OTL_TRACE_FORMAT_DATETIME)
  48. Example 695 (Skipping to the end of the row with otl_stream::skip_to_end_of_row())
  49. Example 712 (END-OF_ROW check)
  50. Example 722 (OTL/DB2-CLI and bulk operations with DB2's BLOB)
  51. Example 727 (MERGE statement, DB2)
  52. Example 730 (Large numbers (larger than singed 64-bit int))
  53. Example 738 (get_dirty_buf_len() with INSERT and SELECT)
  54. Example 744 (Extened / customized numeric data type support)
  55. Example 749 (VARCHAR column bound as RAW[XXX] for reading/writing std::strings that have null terminators ('\0') in the middle)
  56. Example 757 (otl_read_from_stream() / otl_write_to_stream() and STL containers)
  57. Example 764 (otl_connect_pool)
  58. Example 771 (OTL stream, std::tuple<>, and std::array<char,...>)

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.