Datasets "Disconnected behaviour"

smartsid

Member
Joined
Jan 26, 2003
Messages
11
Hi i am really confused by the term "datasets r disconneceted in nature"

does this really mean that when the data is retrived into a dataset it is actually copied on client side and all the operations are performed here, no matter even if the database connection is broken down or disconnected and we only need to reconnect at the time of updation.


one more book stated that "disconnected" means the dataset doesnot care or doesnot need to know what type of database it is connected to , and can perform the same operations on all the databases..............hence it is said to be disconnected from the database


so which one is the correct definition????????????
 
DataSets are disconnected. They have NO concept of a connection, SQL syntax, source database or anything else. You can test it by creating a DataSet in code, adding tables, columns, relationships, and everything.

If you want to fill a DataSet from a database you must use a DataAdapter, which has a Fill method that fills up a DataSet. Likewise, to update a database you use the DataAdpaters Update method (or execute INSERT, UPDATE and DELETE SQL commands through a command object).

-nerseus
 
Back
Top