f$ADOUpdate
f$ADOUpdate
With this function, a list of data records from an indexed parameter group is written back to the database table. The data records must have previously been read with f$ADORead. Only the data records in the database which have had at least one value modified are changed.
After calling f$ADOUpdate, f$ADOClose must be called except if another update is to occur.
Syntax: | Status = f$ADOUpdate(ConnectNo,SQLNo,Close) | ||
| Argument | Type | Meaning |
| ConnectNo | Integer | Connection identifier from f$ADOConnect |
| SQLNo | Integer | SQL number returned by f$ADORead. |
| Close | Integer | Close the record set (1) or not (0) |
Result: | Integer | Write status: 0 : update was successful -1 : update rejected by the database -2: parameter group not found -10: ADO connection does not exist -11: invalid SQL number | |
Example: | Channel = f$ADOConnect ('Provider=sqloledb;Data Source=Server1;Initial Catalog=Salesmanager ','sa'‚' ') SQL = 'Select * from T_Anschrift where FiBuNr=1' SQLNo = f$ADORead(Channel,SQL,Addresses, 'Status','Count',1) Addresses[11].Town = 'Stuttgart' Status2 = f$ADOUpdate(Channel,SQLNo,1) | ||