Here are the commonly used classes in
System.Data.SqlClient:
SqlCommand:
Represents a Transact-SQL statement or stored procedure to execute against a SQL Server database.
SqlCommandBuilder:
Automatically generates single-table commands used to reconcile changes made to a DataSet with the associated SQL Server database.
SqlConnection:
Represents an open connection to a SQL Server database.
SqlDataAdapter:
Represents a set of data commands and a database connection that are used to fill the DataSet and update a SQL Server database.
SqlDataReader:
Provides a means of reading a forward-only stream of rows from a SQL Server database.
SqlTransaction:
Represents a Transact-SQL transaction to be made in a SQL Server database.
For more ADO.Net Interview Questions,
click here.
System.Data.SqlClient namespace is the .NET Framework Data Provider for SQL Server.
The .NET Framework Data Provider for SQL Server describes a collection of classes used to access a SQL Server database in the managed space. Using the
SqlDataAdapter, you can fill a memory-resident
DataSet, which you can use to query and update the database.
For the commonly used classes in
System.Data.SqlClient, click here.
For more ADO.Net Interview Questions,
click here.
QueryString is a property of Request object in ASP.Net that provides a mechanism to send information to the server in the form of Sting in the URL.
Example:
http://www.testsite.com/Webform1.aspx?fname=Alok&lname=Ranjan
In the above example, the destination webform name is Webform1.aspx and the information passed in QueryString is
fname=Alok&lname=Ranjan. fname is a variable whose value is Alok, and similarly lname variable has value as Ranjan.
Advantages of QueryString:
- It's very easy to implement
- Every browser works with QueryString.
- It doesn't require server resources. Hence, doesn't put any burden on Server.
Disadvantages of QueryString:
- There is a limitation in the length of the QueryString as URL length has a limit. If you have to send lot of information, QueryString approach doesn't work.
- The information passed through QueryString is publicly visible. Hence, it poses security issue. So, QueryString can't be used while sending sensitive info.
- QueryString can not be used to send & and space characters.