-----------------------------------------------------------
New Message on MumbaiUserGroup
-----------------------------------------------------------
From: aamirOnline
Message 4 in Discussion
Hi
1) How do you achieve concurrency control in a
vb.net application
Are you talking about ADO.Net data concurrency or Threading (Threadsafty)
?
2) When would you use datareader and when would you use a dataset
Dataset uses IDataAdapter which further uses uses
IDbCommand and IDbDataReader for CRUD (Create Read Update Delete)
operations.... Dataset is said to be an in memory representation of the
database means, it can load and hold multiple database tables and their
relationships for disconnected data processing which demands more
memory on the server. whereas datareader doesnt hold the records in the
momory so less memory is required. CRUD is faster in connected scenario
(IDbCommand and IDataReader) where as its slow in the Disconnected scenario
becase of intermediate processings. But Datasets give you more power more
control where as DataReader doesnt......
According to MSDN when deciding whether your application should
use a DataReader (see Retrieving
Data Using the DataReader) or a DataSet (see Creating
and Using DataSets), you should consider the type of functionality that
your application requires. Use a DataSet to do the following:
Remote data between tiers or from an XML Web service.
Interact with data dynamically such as binding to a Windows Forms
control or combining and relating data from multiple sources.
Cache data locally in your application.
Provide a hierarchical XML view of relational data and use tools like
an XSL Transformation or an XML Path Language (XPath) Query on your data.
For more information, see XML
and the DataSet.
Perform extensive processing on data without requiring an open
connection to the data source, which frees the connection to be used by
other clients.
If you do not require the functionality provided by the
DataSet, you can improve the performance of your application by using
the DataReader to return your data in a forward-only read-only
fashion. Although the DataAdapter uses the DataReader to fill
the contents of a DataSet (see Populating
a DataSet from a DataAdapter), by using the DataReader you can
receive performance gains because you will save memory that would be
consumed by the DataSet, as well as saving the processing required to
create and fill the contents of the DataSet.
Hope you got the answer.....
regards
M
Aamir Maniar
System Analyst (CWS), Freelance OOAD Consultant
[EMAIL PROTECTED]
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]