Using the Save method, a recordset's contents can be saved to a file. This process is called persisting data. This is particularly useful if the user wishes to close the application and return to it later without reconnecting to the data source.
Persisting data is also useful for a disconnected recordset, since the connection and the application can be closed while the recordset is still available on the client computer.
To save the contents of the current recordset to a file, use the Save method. The Save method allows you to specify the format of the data and whether an existing file should be overwritten. By default, the Save method fails if a file with the same name already exists.
The following example code saves the recordset's contents to a file on the local computer:
rsStudents.Save "c:\studentinfo.dat", adPersistADTG
To rebuild the recordset from data that was saved, use the Open method and refer to the file name. The following example code reopens a persisted recordset:
rsStudents.Open "c:\studentinfo.dat"