skip to main content
Using the Driver : DataDirect Test : DataDirect Test Tutorial : Updatable Result Sets : Inserting a Row
  

Try DataDirect Drivers Now
Inserting a Row
1. From the Connection window menu, select Connection / Create JDBC 2.0 Statement.
2. Complete the following fields:
a. In the resultSetType field, select TYPE_SCROLL_SENSITIVE.
b. In the resultSetConcurrency field, select CONCUR_UPDATABLE.
Get JDBC 2.0 Statement Properties window
3. Click Submit; then, click Close.
4. Select Statement / Execute Stmt Query.
5. Specify the Select statement that you want to execute and click Submit. Then, click Close.
Execute SQL Query window with SQL statement
6. Select Results / Inspect Results. The Inspect Result Set window appears.
Inspect Result Set window with name and type information
7. Click Move to insert row; Current Row is now Insert row.
8. Change Data Type to int. In Set Cell Value, enter 20. Click Set Cell.
9. Select the second row in the top pane. Change the Data Type to String. In Set Cell Value, enter RESEARCH. Click Set Cell.
10. Select the third row in the top pane. In Set Cell Value, enter DALLAS. Click Set Cell.
11. Click Insert Row.
12. To verify the result, return to the Connection menu and select Connection / Load and Go. The Get Load And Go SQL window appears.
13. Specify the statement that you want to execute and click Submit. Then, click Close.
Get Load And Go SQL window with SQL statement
14. The Connection window shows the newly inserted row.
Connection window with table data
Caution: The ID will be 3 for the row you just inserted because it is an auto increment column.