1.

How Can I Retrieve Two Tables Of Data At A Time By Using Data Reader?

Answer»

If we execute 2 select command either in stored procedure or in select command and then executereader method FIRED of command object. it RETURN 2 tables in DATAREADER.

E.g:
string str="Select * from a;select * from b";
cmd.commandtext=str;
dr=cmd.executereader();

Now it return 2 tables in datareader (dr).

If we execute 2 select command either in stored procedure or in select command and then executereader method fired of command object. it return 2 tables in datareader.

E.g:
string str="Select * from a;select * from b";
cmd.commandtext=str;
dr=cmd.executereader();

Now it return 2 tables in datareader (dr).



Discussion

No Comment Found