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.
- Example
24 (MS SQL Server stored
procedure call)
- Example
27 (TIMESTAMP_STRUCT and
MS
SQL Server)
- Example
28 (MS SQL Server and TEXT
column)
- Example
29 (MS SQL Server and
IMAGE
column)
- Example
33 (MS SQL Server:
otl_stream::describe_select() and result sets)
- Example
55 (Datatype override in
SELECT, MS SQL Server)
- Example
67 (Simple Insert/Select
and otl_stream::clean() function for OTL/ODBC and MS SQL Server)
- Example
74 (STL std::strings, ANSI
C++ typecasts, MS SQL Server)
- Example
77 (STL-compliant OTL/ODBC
stream iterators, MS SQL Server)
- Example
99 (otl_value<T>,
ODBC / MS SQL Server)
- Example
103 (#define
OTL_UNCAUGHT_EXCEPTION_ON, ODBC / MS SQL Server)
- Example
104 (#define
OTL_EXTENDED_EXCEPTION, ODBC / MS SQL Server)
- Example
105 (OTL/ODBC and MS SQL
Server's GUIDs)
- Example
108 (OTL/ODBC and bulk
operations with MS SQL Server's TEXT)
- Example
112 (Group data type
override in SELECT, MS SQL Server)
- Example
120 (OTL_VALUE_TEMPLATE_ON,
OTL_USER_DEFINED_STRING_CLASS_ON, ODBC / MS SQL
- Example
124 (Insert/Update/Select
with MS SQL Server TEXT in stream mode)
- Example
125 (Insert/Update/Select
with MS SQL Server IMAGE in stream mode)
- Example
131 (Describe
otl_stream's
bind variables for MS SQL Server)
- Example
155
(set_transaction_isolation_level, ODBC, MS SQL)
- Example
158 (external logon,
ODBC,
MS SQL)
- Example
160 (otl_stream::clean(),
cancelling SELECT's fetch sequence, MS SQL Server)
- Example
163 (otl_stream::clean(),
cancelling Result Set's fetch sequence, MS SQL Server)
- Example
165 (otl_stream::clean(),
cleaning the SELECT stream's error flags, MS SQL Server )
- Example
168 (otl_stream::clean(),
cleaning the Result Set stream's error flags, MS SQL Server )
- Example
170 (#define's
OTL_DEFAULT_XXX_NULL_TO_VAL, MS SQL Server)
- Example
203 (otl_datetime
container with Datetime values down to milliseconds in MS SQL Server)
- Example
206 (otl_exception,
derived from a base class, MS SQL Server)
- Example
209 (MS SQL Server and VARBINARY column)
- Example
212
(OTL_ADD_NULL_TERMINATOR_STRING_SIZE,MS SQL Server)
- Example
223 (std::string and
TEXTs, MS SQL Server)
- Example
235 (SQL statement label,
MS SQL Server)
- Example
237
(OTL/ODBC, accessing the system data dictionary via ODBC functions, MS
SQL Server)
- Example
239 (OTL/ODBC, accessing
the system data dictionary via ODBC functions, MS SQL Server)
- Example
240 (OTL/ODBC, accessing
the system data dictionary via ODBC functions, MS SQL Server)
- Example
242 (64-bit integers (bigint), MS SQL Server, OTL/ODBC)
- Example
247 (user defined string class and TEXTs, MS SQL Server)
- Example
251 (OTL tracing, ODBC, MS SQL Server)
- Example
255 (Explict bind variables in SELECT statement column definitions,
ODBC, MS SQL Server)
- Example
259 (#define OTL_THROWS_ON_SQL_SUCCESS_WITH_INFO, ODBC, MS SQL Server)
- Example
262 (OTL stream read iterator, simple SELECT, MS SQL / ODBC)
- Example
263 (OTL stream read iterator, implicit result set, MS SQL / ODBC)
- Example
291 (Strict numeric type checking on SELECTs)
- Example 310 (Stream buffer size as int, simple Insert/Select)
- Example 317 (Insert/Update/Select
with MS SQL Server TEXT in stream mode and
otl_stream_read_iterator)
- Example 318 (Insert/Update/Select
with MS SQL Server IMAGE in stream mode and
otl_stream_read_iterator)
- Example 341 (OTL stream read
iterator, "get by name" functions, MS SQL / ODBC)
- Example 374
(Simple Insert/Select,
otl_connect::operator<<, <<=, >>)
- Example 381
(Insert/Update/Select, MS SQL TEXT in stream mode, and
std:strings)
- Example 389 (Insert/Update/Select
with MS SQL Server TEXT in stream mode, without
otl_lob_stream::set_len())
- Example 390 (Insert/Update/Select
with MS SQL Server IMAGE in stream mode, without
otl_lob_stream::set_len())
- Example 448 (Simple Insert/Select
with VARBINARY datatype)
- Example 449 (Simple Insert/Select
with BINARY datatype)
- Example 459 (Simple Insert/Select
with VARBINARY datatype and otl_stream_read_iterator)
- Example 460 (Simple Insert/Select
with BINARY datatype and otl_stream_read_iterator)
- Example 468 (MS SQL Server 2005 and
VARCHAR(MAX))
- Example 469 (MS SQL Server 2005 and
VARBINARY(MAX))
- 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.