|
-
Apr 29th, 2003, 04:46 AM
#1
Thread Starter
New Member
Use multiple datareader
Hi all!!!!!
In VB6.0 we use to write a code like this...........
//////////////////////////////////////////////////////////////////////////
Dim con as adodb.connection
Dim rs as adodb.recordset
Dim rs1 as adodb.recordset
set con=new adodb.connection
with con
.provider="SQLOLEDB"
.connectionstring="xyz"
.open
end with
set rs=new adodb.recordset
set rs1=new adodb.recordset
st="select sch_code from sch_master order by 1"
rs.open st,con
if not rs.eof then
while not rs.eof
st="select f_val from f_value where sch_code='"& rs("sch_code") &"'"
rs1.open st,con
if not rs1.eof then
''/////////code to display data in grid///////////////
end if
rs1.close
rs.movenext
wend
end if
///////////////////////////////////////////////////////////////////////////////
How can I perform the same operation as stated above using ADO.NET(Dataset/DataReader) and the program should must have only one connection.
Please Reply Me
Manish Raj
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|