Using two Datareader

R

Randall

Hi all,
I have to use two separate queries in an .aspx file.
What is the way to use two Datareaders for that.

Or is there any other solution?

Any kind of help or coding or documentation is
appreciated.

Thanks,
Randall
 
G

Guest

You can use

dim comm as sqlcommand = new sqlcommand("select * from
query1","select * from query2")

dim dataset1 as dataset= new dataset(comm,connectionstring)

dim da as new dataadapter

da.fill(comm)

da.table(0) for first query table
da.table(1) for second query table

Thanks
Ninan J
 
R

Randall

Thanks Ninan.
What if I have to use same table in both the queries?
Any suggestion?

Regards,
Randall.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top