Data.DB.TDataSet.InsertRecord

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure InsertRecord(const Values: array of const);

C++

void __fastcall InsertRecord(System::TVarRec const *Values, const int Values_High);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DB.pas
Data.DB.hpp
Data.DB TDataSet

Description

Inserts a new, populated record to the dataset and posts it.

Call InsertRecord to create a new, empty record in the dataset, populate it with the field values in Values, and post the values to the database or change log. In C++, the Values_Size parameter indicates the index of the last value in the Values array (one less than the number of values).

A newly inserted record is posted to the database in one of three ways:

For indexed Paradox and dBASE tables, the record is inserted into the dataset in a position based on its index.

For unindexed Paradox tables, the record is inserted into the dataset at the current position.

For unindexed dBASE, FoxPro, and Access tables, the record is inserted into the dataset at the end.

For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record information.

The newly inserted record becomes the active record.

See Also


Code Examples