Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
See Also |
Quick Tour |
Batch Insert Form |
Users navigate to the Batch Insert form by clicking on the Batch Insert button on the Employee form. The Batch Insert form has a grid that displays the entered data and a row of text boxes where the user enters each record. (We make the user enter records here because the Visual Basic grid does not allow user updates.) To keep our example simple, we allow the users to enter only Employee Number, Employee Name, and Department Number fields.
The user enters a record in the text boxes and clicks on the "Add to Grid" button. The program displays the entered records in the grid. To insert the whole batch to the database, the user clicks on the "CommitGrid" button.
The batch insert form uses three procedures. The Form_Load() procedure initializes the grid with the column headers. The CmdAddtoGrid_click() procedure copies the entered data from the text boxes to the grid. The CommitGrid_Click() procedure contains the parameter array and SQL statement code used to make the batch insert. Refer to the following sections or click on the button in the Batch Insert Form window:
Coding the Batch Insert Form_Load() Procedure