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
How can you identify whether or not any changes are made to the DataSet object since it was last loaded?
What is a string variable?
How would you connect to database using .NET?
What is ado in agriculture?
What are the different methods available under the sqlcommand class to access the data?
What is the purpose of using adodb?
What is a datareader object?
What is ole used for?
What DataReader class do in ADO.NET ?
List all the steps in order, to access a database through ado.net?
What are the difference between readonly vs. Const?
What is Data view?
What is the difference between Optimistic and Pessimistic locking?
What is executequery?
How do you implement locking concept for dataset?