The Append attribute function passes a list of values to the table variable. These values are appended to the database table as a new record. This requires a valid SQL statement. The values are linked to the database table fields in the order specified in the SQL statement.
Syntax | ||||
Append([Param1] [, Param2] … [, ParamN]) | ||||
Return value | ||||
None | ||||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Optional |
Param1 - N |
Variant |
ByVal |
Values to be attached as a new record |
If no parameter is specified, the record is only prepared for appending. In this case, specify the individual column values and then execute the update attribute function.
Example:
Dim T As Table
T.Connection := DBCRM
T.Query := "SELECT * FROM |CRM.DBTables.Customer| WHERE 0=1"
T.Append
T.SetDataByFieldName("CUSTID") := "{" & ID & "}"
T.SetDataByFieldName("CUSTCOMPANY") := CUSTCOMPANY
T.Update