19 June 2010

Dotnet faq

Dotnet faq


In ADO.NET DataReader to retrieve a read-only, forward-only stream of data from a database. Results are returned as the query executes, and are stored in the network buffer on the client until you request them using the Read method of the DataReader. Using the DataReader can increase application performance both by retrieving data as soon as it is available, and (by default) storing only one row at a time in memory, reducing system overhead.

Supporting Multiple Resultsets
The DataReader supports access to multiple resultsets, one at a time, in the order they are retrieved.


A DataAdapter is used to retrieve data from a data source and populate tables within a DataSet. The DataAdapter also resolves changes made to the DataSet back to the data source. The DataAdapter uses the Connection object of the .NET Framework data provider to connect to a data source, and it uses Command objects to retrieve data from and resolve changes to the data source.
The DataSet, which is an in-memory cache of data retrieved from a data source, is a major component of the ADO.NET architecture. The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects.

Stored procedure default return value
A stored procedure may return a single integer value, but it can return many output parameters. When a stored procedure encounters a RETURN statement, it exits immediately to the calling code. The default return value is 0,
Non zero return value usually represents failure of some sorts

Why would you want to use serialization?

The two most important reasons are to persist the state of an object to a storage medium so an exact copy can be recreated at a later stage, and to send the object by value from one application domain to another. For example, serialization is used to save session state in ASP.NET and to copy objects to the clipboard in Windows Forms. It is also used by remoting to pass objects by value from one application domain to another.


  1. 1.How to: Redirect Users to Another Page in asp.net?


    2.Server.Transfer("Page2.aspx", True)

  2. http://msdn.microsoft.com/en-us/library/bb981440.aspx


Comments Welcome