Answer Posted / anup kumar
yes, it is posible. by using NextResult() method of
sqldatareader.
sqlcommand cmd = new sqlcommand("select id from emp ; select
dptid from dpt",YourConnection);
//check connection status and open the connection
if(rdr.hasrows)
{
//read id from emp
}
if (rdr.HasRows() == true)
{
//read dptid from dpt
}
//close the connection
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is the difference between Datareader and Dataset?
What are the advantages of ado.net?
What is an orm, and why would you use one instead of plain old ado.net?
Does executenonquery return a value?
How to add an aggregate column?
What are the rules to implement connection pooling?
What is the difference between executequery and executenonquery?
How to Read, Add, Update and Delete record in Entity Framework ?
How can we check that some changes have been made to dataset since it was loaded?
Which property is used to check whether a DataReader is closed or opened?
What is ado.net object model?
What are the data access namespaces in .NET?
What is ado.net in vb net?
Command objects uses, purposes and their methods.
What are the benefits of using ado.net?