Professional Documents
Culture Documents
Questions
Questions
Q2):What is DataBinding?
Data binding refers to the process of dynamically assigning a value to a property of a
control at runtime. For example, you can use data binding to bind the properties of a
control to a data source such as the contents of a SQL Server database table.
Q3):What is an Object?
An object is an instance of a class.
Instances are created by declaring a variable of the class type to hold a reference
to an instance (or object) of that class.
Instantiate or create a new instance of a class using the new keyword.
A DataSet enables you to represent the results of a database query in your server's
memory. Because a DataSet provides you with a memory-resident representation of data,
you can work with the results of a database query as a whole. For example, a DataSet
includes methods for sorting, filtering, and returning a count of the records from a
database query.A DataSet can contain one or more DataTables that represent database
tables. Relationships between the tables (such as parent/child relationships) can be
defined using DataRelation classes. Finally, a DataView represents a particular filtered or
sorted view of a DataTable.
0
Preeti
Re: Difference between DataReader and DataAdapter / DataSet and
DataAdapter? Answer
#2
When accessing data the DataReader is the hands down winner.
Performance increases almost exponentially over the DataSet
when more than a few queries are executed sequentially.
Simple, fast forward, read-only access to result sets is the
DataReader's favorite pastime. If data doesn't need to be
modified, cached or serialized consider using a reader.
Don't dismiss the DataReader just because you need results
in XML. Try using the ExecuteXmlReader method of the
SqlCommand class. Just don't forget the FOR XML clause in
your query.
Business applications with a strong BLL that coerce
requested data into new types can use a DataReader without
fear of lost scalability. Often times the application's
business objects can easily duplicate or enhance some of the
functionality that the DataSet is so popular for. Creating
those business objects can mean the difference between an
application that entirely relies on DataSets to one that can
leverage their usefulness only where need be.
Binding of read-only data is much more efficient using a
reader. Just imagine how many times a day that DropDownList
you use is populated. Remember how much things cost in the
long run.