RESYNC method
Refresh the data in the current RECORDSET object from the basic database.
grammar
RecordSet.Resync AffectRecords, ResyncVales
parameter
AffectRecords optional, Affectenum value, determines the number of records affected by the RESYNC method, one of the following constants.
Constants Description AdaffectCurrent only refreshes the current record. The AdaffectGroup refreshes a record that meets the current Filter property settings. This option can only be used to set the Filter property to a valid predefined constant. ADAFFECTALL default. Refresh all records in the Recordset object, including records hidden due to the current Filter property settings. AdAffectallchapters refreshes all subset records.
RESYNCVALUES is optional, the resyncenum value. Specifies whether to overwrite the basic value. Can be one of the following constants.
Constant illustrates the default value of AdResyncallVALUES. Cover data and cancel the hang update. AdResyncunderlyingValues does not overwrite data and does not cancel the hang update.
Description
Use the RESYNC method to resynchronize the records in the current RECORDSET with the basic database. This is useful when using static or only forward cursors but want to see changes in the basic database.
If the CursorLocation property is set to AduseClient, RESYNC is only available to non-read-only Recordset objects.
Unlike the Requery method, the RESYNC method does not re-execute the basic commands of the RecordSet object, and the new records in the basic database will be invisible.
If the re-synchronization attempt is made due to a basic data conflict (such as other users who have already deleted records), the provider returns the warning to the ERRORS collection and generates an error. Use the FILTERCONFLICTICORDS and Status properties to find a record of conflict.
Remote Data Services The resync method is invalid on the client Recordset.
If the Unique Table and RESYNC Command dynamic properties are set, and the Recordset is the result of performing the JOIN operation for multiple tables, then the RESYNC method will only perform the operations given in the RESYNC Command attribute in the unique Table property.
Save method (ADO RECORDSET)
Save (persistent) in the file.
grammar
RecordSet.save filename, PersistFormat
parameter
FileName is optional. The full path name of the file is used to save the RECORDSET.
PersistFormat is optional. PersistFormateNum value specifies the format used to save the Recordset. Can be a constant as follows:
Constant Description AdpersistAdtg (default) Saves using dedicated "Advanced Data TableGram" format. AdpersistXML is saved using XML format.
Description
Only call the Save method to the open Recordset. Then follow the Open method to recover the Recordset by FileName.
If the Filter property affects the RECORDSET, only the filter line will be saved. If Recordset is a hierarchical structure, the current sub-Recordset and its sub-Recordset, but do not save the last RECORDSET.
Specify FileName when you save Recordset. If you subsequently call Save, the filename should be ignored, otherwise the runtime error will occur. If you subsequently call Save with the new filename, the Recordset will be saved in a new file, but the new files and original files are open. Save does not close Recordset or FileName so you can continue to use RecordSet and save the latest changes. Filename will remain open before the Recordset is closed, and other applications can be read but cannot be written to FILENAME.
For security reasons, the Save method only allows low and custom security settings for the SAVE method. For detailed explanations for security issues, see the white paper title "Security Issues In The Microsoft Internet Explorer" on http://www.microsoft.com/data/techmat.htm.
If the Save method is called when the asynchronous RECORDSET is being taken, execute, or update operation, Save will enter the waiting state until the asynchronous operation is completed.
After the Save method is complete, the current line location will become the first line of Recordset.
To get the best results, you should use Save to set the CURSORLOCATION property to aduseclient. If your provider does not support the required functions for saving the RecordSet object, the client cursor will provide this feature.
Seek method
Search for RECORDSET's index, quickly locate rows match the specified value, and change the current row to the line.
grammar
Recordset.seek keyvalues, seekoption
parameter
An array of keyvalues variant values. The index consists of one or more columns, and the array contains a value compared to each corresponding column.
Seekoption seekenum value, specifies the type of comparison between the index columns and the corresponding KeyVALUES. Can be a relatively constant as follows:
Constant Description AdseekAftereq looks out for keywords, or looks only after you have already matched. The AdSeekAfter only looks out after the location that has already been matched with KeyVALUES. AdseekBeForeeQ looks out for keywords, or only looks before the location already matched. AdseekBefore only looks before you have already matched to KeyVALUES. AdSeekfirsteq looks out that the first keyword is equal to KeyValues. Adseeklasteq looks for the last keyword equal to KeyValues.
Description
If the basic provider supports the use index for the Recordset object, use the SEEK method with the index property. Please use the Supports (AdIndex) method to determine if the basic provider supports an index.
If SEEK does not find a row you want, no errors have, and rows are positioned in EOF. Before performing this method, set the index property to the desired index.
This method can only be used when the value of the CursorLocation property of the Recordset object is not aduseclient.
Submitchanges Method (RDS)
Submitting a locally cached RECORDSET to the ODBC data source specified in the Connect property.
grammar
DataControl.submitchanges
DataFactory.Submitchanges Connection, Recordset
parameter
DataControl object variables represent RDS.DataControl objects. The DataFactory object variable represents the RDSServer.DataFactory object.
Connection string values, represents a connection created with the Connect property of the RDS.DataControl object.
Recordset object variable represents the Recordset object.
Description
You must set up CONNECT, Server, and SQL properties before using the SubmitChanges method of the RDS.DataControl object.
If the cancelupdate method is called after the SubmitChanges that has already called the same Recordset object, the cancelupdate call will fail due to the changes.
Only the changed record is sent for modification, change or all success or all fail.
SubmitChanges can only be used by the default RDSServer.DataFactory object. Customized business objects cannot be used.
Supports method
Determine whether the specified Recordset object supports a specific type of function.
grammar
Boolean = RecordSet.supports (CURSorOptions)
return value
Returns the Boolean value, indicating whether the provider supports all the features identified by the CursorOptions parameter.
parameter
Cursoroptions Long integer expressions, including one or more of the following CursorOptionNum values.
Constant Description AdadDNEW can add new records using the AddNew method. AdapProxPosition reads and sets the properties of AbsolutePosition and AbsolutePage. AdbookMark uses the Bookmark property to get access to specific records. Addelete can use the delete method to delete records. AdHoldRecords can retrieve multiple records or change the next retrieval location without having to submit all hang changes. AdmovePRevious can use the MoveFirst and MovePrevious methods, and the Move or getRows method to move the current record position backward without having to use a bookmark. AdResync Using the RESYNC method using data update cursors visible in basic databases. Adupdate can modify existing data using the UPDATE method. AdupdateBatch can use batch updates (UpdateBatch and Cancelbatch methods) will change groups to the provider. Adindex can name an index using an Index property. AdSeek can use the Seek method to locate the rows in the Recordset.
Description
Use the Supports method to determine the type of function supported by the Recordset object. If the Recordset object supports its corresponding constant in CursorOptions, then the Supports method returns true. Otherwise returning false.
Note Although the Supports method returns TRUE for a given function, it cannot guarantee that the provider can make functions in all environments. The Supports method only returns whether the provider supports the specified function (assuming some conditions). For example, the Supports method may indicate that the Recordset object supports updates (even if the cursor is based on multiple tables of merge), but some columns still cannot update.
Update method
Save all changes made to the current record of the Recordset object.
grammar
Recordset.Update Fields, Values
parameter
Fields is optional. Variable body type, represents a single name; or variant array, represents a field (one or more) names and serial numbers that need to be modified.
VALUES is optional. Variable body, represents a single value; or variant array, represents a field (single or multiple) value in the new record. Description
Save all changes made since using the UPDATE method or to change any field values in existing records. The Recordset object must support updates.
To set a field value, do one of the following:
Assign a value for the value attribute of the field object, and call the Update method. The field name and value are transmitted in the UPDATE call as a parameter. Transfer field names and value arrays in the Update call.
When using the array of fields and values, the two arrays must have equal number of elements, and the order of the field name must match the order of the field value. The quantity and order of the fields and values do not match the error.
If the RecordSet object supports the batch update, you can have a multiple change in one or more records before calling the UpdateBatch method. If you are editing the current record or add a new record when calling the UpdateBatch object, the ADO will automatically call the Update method to save the hang change before transferring the batch change to the provider.
If you move the record that is being added or edited before calling the Update method, the ADO will automatically call Update to save your changes. If you want to cancel any changes to the current record or give up the newly added record, you must call the CancelupDate method.
The current record is still currently recorded after calling the UPDATE method.
If the Unique Table dynamic property is set, and the Recordset is the result of performing the JOIN operation for multiple tables, then the Update method will not update any of the keywords of multiple tables. In addition, Update can only update the fields in the table specified in the UNIQUE TABLE property.
Updatebatch method
Write all suspended batch updates to disk.
grammar
Recordset.Updatebatch affectrecords
parameter
AffECTRecords optional, affectenum value. The number of records that determine the records affected by the UpdateBatch method. Can be one of the following constants.
Constant Description AdaffectCurrent is only written to the current recorded hang change. ADAFFECTGROUP is written to a suspend change that occurs when the current Filter property setting. This option must be set to a valid predefined constant to use the Filter property. Adaffectall (default). Write all records of all records in the Recordset object, including any records hidden due to the current Filter property settings. Adaffectallchapters is written to all subset of hang changes.
Description
When you modify the Recordset object, use the UpdateBatch method to pass all changes in the RecordSet object to the basic database.
If the RecordSet object supports batch updates, you can cache one or more multiple changes to the local, then call the UpdateBatch method. If you are editing the current record or add a new record when calling the UpdateBatch method, the ADO will automatically call all the hang changes to the current record before transferring the appointment update to the provider.
Note You can only use batch updates to the key set or static cursor.
If the transfer change for all or any record is fails due to the basic data conflict (such as the other user has deleted records), then the provider will return the warning to the Erroors collection and the runtime error. Use the Filter attribute (AdfilteraffTedRecords) and the Status property to find a record of conflict.
To cancel all suspended batch updates, use the CancelBatch method.