
Module: DB Interface Module Group: Bulk Classes
RWDBVector<T>RWDBTBuffer<T>
#include <rw/db/dbvector.h> RWDBVector< int > intVector(n);
Class RWDBVector<T> is derived from RWDBTBuffer<T>. It is used to transfer data between the application and the database via RWDBBulkReaders and RWDBBulkInserters.
NOTE -- Class RWDBVector<T> is deprecated. Please use RWDBTBuffer<T>.
The following example uses an RWDBVector<int> to insert an array of integers into a table. The 5th element in the array is inserted as null.
RWDBVector< int > intVector(n); // Set the 5th element to be null. intVector.setNull(4); // 0 based array. // Populate the arrays using a user-defined function. setValues(intVector); // Define the inserter. RWDBBulkInserter ins = tab.bulkInserter(connection); // Shift the arrays into the inserter. ins << intVector; // Insert up to n values at a time. RWDBStatus stat = ins.execute();
© Copyright 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.
Contact Rogue Wave about documentation or support issues.