OTL 4.0, Examples for MS SQL / ODBC

The examples below work with MS SQL Server via ODBC. In general, all of these examples should work with any MS SQL Server  7.0 and higher, when ODBC  is enabled in OTL by setting #define OTL_ODBC. For more examples, see the Generic ODBC examples.

  1. Example 24 (MS SQL Server stored procedure call)
  2. Example 27 (TIMESTAMP_STRUCT and MS SQL Server)
  3. Example 28 (MS SQL Server and TEXT column)
  4. Example 29 (MS SQL Server and IMAGE column)
  5. Example 33 (MS SQL Server: otl_stream::describe_select() and result sets)
  6. Example 55 (Datatype override in SELECT, MS SQL Server)
  7. Example 67 (Simple Insert/Select and otl_stream::clean() function for OTL/ODBC and MS SQL Server)
  8. Example 74 (STL std::strings, ANSI C++ typecasts, MS SQL Server)
  9. Example 77 (STL-compliant OTL/ODBC stream iterators, MS SQL Server)
  10. Example 99 (otl_value<T>, ODBC / MS SQL Server)
  11. Example 103 (#define OTL_UNCAUGHT_EXCEPTION_ON, ODBC / MS SQL Server)
  12. Example 104 (#define OTL_EXTENDED_EXCEPTION, ODBC / MS SQL Server)
  13. Example 105 (OTL/ODBC and MS SQL Server's GUIDs)
  14. Example 108 (OTL/ODBC and bulk operations with MS SQL Server's TEXT)
  15. Example 112 (Group data type override in SELECT, MS SQL Server)
  16. Example 120 (OTL_VALUE_TEMPLATE_ON, OTL_USER_DEFINED_STRING_CLASS_ON,  ODBC / MS SQL
  17. Example 124 (Insert/Update/Select with MS SQL Server TEXT  in stream mode)
  18. Example 125 (Insert/Update/Select with  MS SQL Server IMAGE in stream mode)
  19. Example 131 (Describe otl_stream's bind variables for MS SQL Server)
  20. Example 155 (set_transaction_isolation_level, ODBC, MS SQL)
  21. Example 158 (external logon, ODBC, MS SQL)
  22. Example 160 (otl_stream::clean(), cancelling SELECT's fetch sequence, MS SQL Server)
  23. Example 163 (otl_stream::clean(), cancelling Result Set's fetch sequence, MS SQL Server)
  24. Example 165 (otl_stream::clean(), cleaning the SELECT stream's error flags, MS SQL Server )
  25. Example 168 (otl_stream::clean(), cleaning the Result Set stream's error flags, MS SQL Server )
  26. Example 170 (#define's OTL_DEFAULT_XXX_NULL_TO_VAL, MS SQL Server)
  27. Example 203 (otl_datetime container with Datetime values down to milliseconds in MS SQL Server)
  28. Example 206 (otl_exception, derived from a base class, MS SQL Server)
  29. Example 209 (MS SQL Server and VARBINARY column)
  30. Example 212 (OTL_ADD_NULL_TERMINATOR_STRING_SIZE,MS SQL Server)
  31. Example 223 (std::string and TEXTs, MS SQL Server)
  32. Example 235 (SQL statement label, MS SQL Server)
  33. Example 237 (OTL/ODBC, accessing the system data dictionary via ODBC functions, MS SQL Server)
  34. Example 239 (OTL/ODBC, accessing the system data dictionary via ODBC functions, MS SQL Server)
  35. Example 240 (OTL/ODBC, accessing the system data dictionary via ODBC functions, MS SQL Server)
  36. Example 242 (64-bit integers (bigint), MS SQL Server, OTL/ODBC)
  37. Example 247 (user defined string class and TEXTs, MS SQL Server)
  38. Example 251 (OTL tracing, ODBC, MS SQL Server)
  39. Example 255 (Explict bind variables in SELECT statement column definitions, ODBC, MS SQL Server)
  40. Example 259 (#define OTL_THROWS_ON_SQL_SUCCESS_WITH_INFO, ODBC, MS SQL Server)
  41. Example 262 (OTL stream read iterator, simple SELECT, MS SQL / ODBC)
  42. Example 263 (OTL stream read iterator, implicit result set, MS SQL / ODBC)
  43. Example 291 (Strict numeric type checking on SELECTs)
  44. Example 310 (Stream buffer size as int, simple Insert/Select)
  45. Example 317 (Insert/Update/Select with MS SQL Server TEXT  in stream mode and otl_stream_read_iterator)
  46. Example 318 (Insert/Update/Select with MS SQL Server IMAGE  in stream mode and otl_stream_read_iterator)
  47. Example 341 (OTL stream read iterator, "get by name" functions, MS SQL / ODBC)
  48. Example 374 (Simple Insert/Select, otl_connect::operator<<, <<=, >>)
  49. Example 381 (Insert/Update/Select, MS SQL TEXT in stream mode, and std:strings)
  50. Example 389 (Insert/Update/Select with MS SQL Server TEXT  in stream mode, without otl_lob_stream::set_len())
  51. Example 390 (Insert/Update/Select with  MS SQL Server IMAGE in stream mode, without otl_lob_stream::set_len())
  52. Example 448 (Simple Insert/Select with VARBINARY datatype)
  53. Example 449 (Simple Insert/Select with BINARY datatype)
  54. Example 459 (Simple Insert/Select with VARBINARY datatype and otl_stream_read_iterator)
  55. Example 460 (Simple Insert/Select with BINARY datatype and otl_stream_read_iterator)
  56. Example 468 (MS SQL Server 2005 and VARCHAR(MAX))
  57. Example 469 (MS SQL Server 2005 and VARBINARY(MAX))
  58. Example 470 (MS SQL Server 2005, INSERT with OUTPUT clause)

Prev NextContentsGo Home

Copyright © 1996, 2007, Sergei Kuchin, email: skuchin@ispwest.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.