Executing a Prepared Statement
- Last Updated: May 12, 2026
- 2 minute read
- OpenAccess SDK
- Version 8.1
- Documentation
This example explains how to execute a parameterized statement multiple times.
-
From the Connection window menu, select Connection / Create Prepared Statement. DataDirect Test prompts you for a SQL statement.
-
Specify the Insert statement that you want to execute.

Click Submit; then, click Close.
-
Select Statement / Set Prepared Parameters. To set the value and type for each parameter:
a. Type the parameter number.
b. Select the parameter type.
c. Type the parameter value.
d. Click Set to pass this information to the JDBC driver.
-
When you are finished, click Close.
-
Select Statement / Execute Stmt Update. The JDBC/Database Output scroll box indicates that one row has been inserted.

-
If you want to insert multiple records, repeat Step 3 and Step 5 for each record.
-
If you repeat the steps described in Executing a Simple Select Statement, you will see that the previously inserted records are also returned.
