How to call the SQL commands asynchronously in ADO.NET
version 2.0

Answer Posted / sandyni

In the asynchronous method ,the client creates a SqlCommand
object.the client application also sets the async attribute
in the connection string to true. Next, the client invokes
any of the asynchronous methods such as
beginExecuteNonQuery, BeginExecuteReader, or
BeginExecuteXmlReader through the SqlCommand object.

After executing the sql command the asynchronous methods
will close by using
EndExecuteNonquery,EndExecuteScalar,EndExecuteReader.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is disconnected scenario in entity framework?

777


What are the different namespaces used in the project to connect the database? What data providers available in .net to connect to database?

1024


What are advantages of microsoft-provided data provider classes in ado.net?

767


Define isolation?

746


Which control of the BindingNavigator returns the current position within the data source?

929


What are the different ado.net namespaces are available in .net?

752


What is the difference between executenonquery () and executescalar ()?

688


What is execute reader in ado.net?

697


How to identify the updated rows in a dataset?

716


What is the meaning of executenonquery?

716


What is the role of clr?

723


What is concurrency? How will you avoid concurrency when dealing with dataset? (One user deleted one row after that another user through his dataset was trying to update same row. What will happen? How will you avoid the problem?)

777


What two types of data providers does ADO.NET supply? What determines which one you should use?

740


How would you connect to a database by using .NET?

703


What is executequery?

693