The DB Access Module for Sybase CT supports bulk reading through the array interface provided by the Sybase Open Client function, ct_bind(). Bulk writing is supported through the array interface provided by the Sybase Bulk-Library function, blk_bind(), which is part of the Sybase Open Client/Open Server common libraries.
The RWDBBulkInserter functions execute() and execute(int iters) cause values that are associated with each of the arrays shifted into self to be inserted into the table associated with self. The following example uses an RWDBBulkInserter to insert an array of strings and integers into a table.
// Define the arrays that will hold the data to be inserted int length = 10; RWDBTBuffer<RWCString> stringBuffer(length); RWDBTBuffer<int> intBuffer(length); // Populate the arrays using a user-defined function setValues(stringBuffer, intBuffer); // Define the inserter. RWDBBulkInserter ins = table.bulkInserter(connection); // Shift the arrays into the inserter ins << stringBuffer << intBuffer; // Insert up to length values at a time RWDBResult result = ins.execute(length); // The results of the insertion will now be visible to the // reader RWDBReader rdr = table.reader(connection);
© 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.