Using two Datareader

  • Thread starter Thread starter Randall
  • Start date Start date
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
 
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
 
Thanks Ninan.
What if I have to use same table in both the queries?
Any suggestion?

Regards,
Randall.
 
Back
Top