SQLSelect.Append Method | |
Create a blank row in the buffer; this blank row becomes the current position and is ready for assignment of data values. The SQLSelect:RecNo of this buffer is SQLSelect:RecCount+1.
Namespace:
VO
Assembly:
VOSQLClasses (in VOSQLClasses.dll) Version: 2.21
Syntax Remarks Tip |
---|
The details of the implementation of this method, and how it interacts with other operations such as unique indexes and concurrency control, depend on the particular database. |
Use FieldPut() to assign values into the blank buffer. When you attempt to move position off this record, an insert will be automatically performed (using SQLSelect:AppendRow()) into the table, using the values in the buffer. You can also deliberately force the update to occur by calling SQLSelect:AppendRow() or SQLSelect:Update(TRUE).
If the AutoCommit option is off, you may need to invoke the Commit() method to insert the row into the database.
Tip |
---|
To cancel the pending update, call the SQLSelect:Delete() method. |
Examples
The following example demonstrates the use of the SQLSelect:Append() method:
1FUNCTION NewRecord()
2LOCAL oSel AS SQLSelect
3LOCAL oConn AS SQLConnection
4oConn := SQLConnection{"sample","dba","sql"}
5oSel := SQLSelect{"SELECT * FROM customer", oConn}
6oSel:Append()
7oSel:CustNo := 515
8oSel:CustName := "Michelle"
9oSel:GoTop()
10oSel:FreeStmt(SQL_DROP)
11oConn:Disconnect()
See Also