SourcePro C++ 13.0 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
Base class for user-defined callbacks. More...
#include <rw/db/datacb.h>
Public Member Functions | |
size_t | entries () const |
virtual size_t | getLength (size_t rownum) const |
RWDBDataCallback is an abstract base class for the encapsulation of user-defined data callbacks. Derive from one of the type-specific classes RWDBCharCallback, RWDBUChar16Callback, or RWDBBinaryCallback to implement new callback instances.
In this example, we define a data callback to insert and fetch data. The program will create a test table with one column of a LOB character type. It will then execute an INSERT statement to insert 10 rows of data and then execute a SELECT statement to read the rows that were inserted.
|
inline |
Returns the number of entries. The number of entries refers to the maximum size of the rowset that can be used with this callback. It is equivalent to the entries in RWDBTBuffer. Please see the class reference for RWDBOSql and the section "Using the Open SQL Classes" of the DB Interface Module User's Guide for more information.
|
inlinevirtual |
Returns the length of the data that will be sent for the row rownum. Whether this value is needed depends on the database vendor. Please see the Access Module User's Guide for your database to make this determination. This method must be overridden in the derived class if the length of the data is needed.
Copyright © 2014 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.