Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

Inserting Rows in Batch

See Also
Quick Tour
Batch Insert Form

The Batch Insert Form allows users to insert rows in batch, that is, to insert more than one record into the database by using only one command. We implement this functionality using parameter arrays and SQL statements.

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

Coding the CmdAddtoGrid() Procedure

Coding the CommitGrid_Click() Procedure


 
Oracle
Copyright © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback