Adding a Row by Using a Result Set Position
The ADO, OLE DB and ODBC APIs support adding rows while processing the result set of a query. The following steps describe the fundamental process:
Bind the result set columns to program variables.
Execute the query.
Call API functions or methods to position the application on a row within the result set.
Fill the bound program variables with the data values for the new row to be inserted.
Call one of the following functions or methods to insert the row:
In ADO, call the AddNew method of the Recordset object.
In OLE DB, call the InsertRow method of the IRowsetChange interface.
In ODBC 3.x, call the SQLBulkOperations function with the SQL_ADD option.
The new row is not necessarily inserted at a position based on the position of the application within the result set. The new row is inserted at a position in the base tables related to the values of any clustered key values specified.