SDAC

TCustomDADataSet.SQLInsert Property

Used to specify the SQL statement that will be used when applying an insertion to a dataset.

Class

TCustomDADataSet

Syntax

property SQLInsert: TStrings;

Remarks

Use the SQLInsert property to specify the SQL statement that will be used when applying an insertion to a dataset. Statements can be parameterized queries. Names of the parameters should be the same as field names. Parameters prefixed with OLD_ allow using current values of fields prior to the actual operation.

Use ReturnParam to return OUT parameters back to dataset.

To create a SQLInsert statement at design-time, use the query statements editor.

If you specify SQLInsert not depending on TCustomMSDataSet.Options.QueryIdentity, the value of the Identity filed won't be returned on execution Insert(Append).Post. To avoid the problem, you should add the following the code in the end of SQLInsert:

INSERT INTO Orders
      (Shipname)
   VALUES
      (:Shipname)

See Also

© 1997-2019 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback