Chapter 13 -- Persisting Your Recordset

[Previous] [Next]

Chapter 13

There will probably be times when your users want to save the current contents of a recordset, disconnect from the server, and still have access to the information in that recordset. A salesperson going on the road is the perfect example of such a user. You want your salesperson to be able to view product and customer information and to create orders while he is on a sales call. This requires that the salesperson save the recordset data to a file—just as you'd save a Microsoft Word document or a Microsoft Excel spreadsheet to a file for later use—on the hard drive of his portable computer. When the salesperson is finished drumming up business, he can reconnect to the database and submit the new orders stored in the files on the hard drive. This ability to retain recordset information after a database or server connection has been closed is called persistence.

Personally, I love this feature. In some of the test applications I've written, I store data in a persisted recordset rather than storing settings in the Microsoft Windows Registry. Not that I have anything against using the Registry, but when I use persisted recordsets, I can put the test application on a server and use the same settings to run the application without having to change the settings of the machine I'm using.



Programming ADO
Programming MicrosoftВ® ADO.NET 2.0 Core Reference
ISBN: B002ECEFQM
EAN: N/A
Year: 2000
Pages: 131
Authors: David Sceppa

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net