Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

2.11 Using Text and Image Data

Sybase SQL Servers support TEXT and IMAGE datatypes, but the use of these datatypes does have limitations. (See the Sybase SQL Server, Transact-SQL User's Guide for more information.) The DBTools.h++ access library for Sybase DB-Library also has limitations due to the functionality of DB-Library itself. (See the Sybase Open Client DB-Library/C Reference Manual for more information.)

DB-Library does not provide direct support for inserting large text or image data. Applications that need to insert large amounts of data must insert place holder values, and then update the inserted row with the real values. This abnormality comes from a DB-Library limitation of dbwritetext(), which works on existing rows only. The DB-Library documentation on dbwritetext() and dbtxptr() suggests that this is the proper method for inserting rows.

Furthermore, DB-Library does not allow the insertion of NULL data into text or image columns. Existing columns can, however, be updated to NULL. This limitation is described in the DB-Library documentation on dbtxtptr().

The DBTools.h++ access library for Sybase DB-Library should be used in the same manner, inserting place holder values for columns then using updates to place the real values into the columns. RWDBUpdater normally formats an SQL statement for execution by SQL Server, however if any of the assignments within the updater are RWCStrings or RWDBBlobs whose length is greater than the connection's text threshold, the access library attempts to use dbwritetext() to update each affected column. Columns in the update that do not exceed the threshold are handled in the usual way. See Section 2.12.5 for more information.

A connection's text threshold is configurable through the connection's system handle. (See Section 2.12.)


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.