georgewong
Member
- Joined
- May 11, 2006
- Messages
- 5
- Programming Experience
- Beginner
Dear all :
Pls help with the following scenario:
'Grab the information from table 1
mycommand = New SqlCommand("select * table1 where userid = '1'", myconnection)
dr_table1 = mycommand.ExecuteReader(CommandBehavior.CloseConnection)
dr_table1.close
..
..
'Grab the information from table 2
myconnection.open
mycommand = New SqlCommand("select * table2 where item_code = '2'", myconnection)
dr_table2 = mycommand.ExecuteReader(CommandBehavior.CloseConnection)
'**** How can I have the information from dr_table1 at here since it was closed before !!
'**** I need to reference some fields from dr_table1 for calculation
..
..
dr_table2.close
Please advise, your kindly assistance is highly appreciately..
George
Pls help with the following scenario:
'Grab the information from table 1
mycommand = New SqlCommand("select * table1 where userid = '1'", myconnection)
dr_table1 = mycommand.ExecuteReader(CommandBehavior.CloseConnection)
dr_table1.close
..
..
'Grab the information from table 2
myconnection.open
mycommand = New SqlCommand("select * table2 where item_code = '2'", myconnection)
dr_table2 = mycommand.ExecuteReader(CommandBehavior.CloseConnection)
'**** How can I have the information from dr_table1 at here since it was closed before !!
'**** I need to reference some fields from dr_table1 for calculation
..
..
dr_table2.close
Please advise, your kindly assistance is highly appreciately..
George