# OTL 4.0, Examples for DB2, Unicode

The examples below show how to use OTL with DB2 and Unicode based strings. At the database level,, the string format may vary (UTF-8, double byte character set (UCS-2), etc). At least at the C++ level all string data gets converted into 2-byte Unicode characters. In order to enable OTL/DB2-CLI and Unicode, the following #defines need to be defined: #define OTL_DB2_CLI, #define OTL_UNICODE. Before trying any of the following examples, make sure that your DB2 database supports Unicode.

1. Example 265 (Simple Unicode Insert/Select and VARCHAR strings)
2. Example 266 (Simple Unicode Insert/Select and VARGRAPHIC strings)
3. Example 267 (Simple Unicode Insert/Select with CLOB)
4. Example 268 (Simple Unicode Insert/Select with DBCLOB)
5. Example 269 (Simple Unicode Insert/Select with CLOB, and LOB streams)
6. Example 270 (Simple Unicode Insert/Select with DBCLOB, and LOB streams)
7. Example 355 (Simple Unicode Insert/Select and #define OTL_UNICODE_CHAR_TYPE)
8. Example 356 (Unicode VARGRAPHIC Insert/Select and #define OTL_UNICODE_CHAR_TYPE)
9. Example 357 (Simple Unicode Insert/Select and #define OTL_UNICODE_STRING_TYPE)
10. Example 358 (Unicode VARGRAPHIC Insert/Select and #define OTL_UNICODE_STRING_TYPE)
11. Example 367 (Unicode CLOB Insert/Select and #define OTL_UNICODE_STRING_TYPE)

Contents Go 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.