Using DataDirect Test™ : DataDirect Test™ Tutorial : Batch Execution on a Prepared Statement

Batch Execution on a Prepared Statement
Batch execution on a prepared statement allows you to update or insert multiple records simultaneously. In some cases, this can significantly improve system performance because fewer round trips to the database are required.
To Execute a Batch on a Prepared Statement:
1.
From the Connection window menu, select Connection / Create Prepared Statement.
Type an Insert statement and click Submit. Then, click Close.
Get Prepared Statement SQL dialog box with an example Insert statement
2.
Select Statement / Add Stmt Batch.
3.
a.
b.
c.
d.
Click Set.
Set Batch Parameters dialog box with example values specified
4.
Click Add to add the specified set of parameters to the batch. To add multiple parameter sets to the batch, repeat Step 2 through Step 4 as many times as necessary. When you are finished adding parameter sets to the batch, click Close.
5.
Select Statement / Execute Stmt Batch. DataDirect Test displays the rowcount for each of the elements in the batch.
Connection window displaying the rowcount for each of the elements in the batch
6.
If you re-execute the Select statement from Executing a Simple Select Statement, you see that the previously inserted records are returned.
Connection window showing that the previously inserted records are returned

© 2012 Progress Software Corporation and/or its subsidiaries or affiliates.