skip to main content
Using the driver : DataDirect Bulk Load : Using a DDBulkLoad object : Loading data from a ResultSet object
  

Try DataDirect Drivers Now
Loading data from a ResultSet object
The setTableName method should be used to specify the table into which you want to load the data. Then, the load method is used to specify the ResultSet object that contains the data you are loading. For example, the following code snippet loads data from a ResultSet object named MyResults into a table named GBMAXTABLE
bulkLoad.setTableName("GBMAXTABLE");
bulkLoad.load(MyResults);
This example loads the first column in the result set to the ColName1 column, the second column in the result set to the ColName2 column, and so on.
You can use the BulkLoadBatchSize property to specify the number of rows the driver loads at a time when bulk loading data. Performance can be improved by increasing the number of rows the driver loads at a time because fewer network round trips are required. Be aware that increasing the number of rows that are loaded also causes the driver to consume more memory on the client.