Re: DataReader Behavior
Posted by: Oscar Rodríguez
Date: February 03, 2005 12:54PM

Thank Simon

About of the question 1, are you refering are MySQLCommand?.
Check my code:

sql = "select * from table1"
cnn1.Open()
cmd = New MySqlCommand(sql, cnn1)
dr = cmd.ExecuteReader

Do While dr.Read
sql = "select * from table2 where field1 = " & dr("fieldn")
cnn2.Open()
cmd = New MySqlCommand(sql, cnn2)
dr2 = cmd.ExecuteReader

If Not dr2.Read Then
sql = "delete from table1 where field1 = " & dr2("field1")
cnn3.Open()
cmd = New MySqlCommand(sql, cnn3)
cmd.ExecuteNonQuery()
cnn3.Close()
End If

cnn2.Close()
Loop

cnn1.Close
------------------------------------

This code is wrong?

Cheers my bro!!! or like say in Panamá(my country): Chillin mi fren

Options: ReplyQuote


Subject
Written By
Posted
February 03, 2005 09:46AM
February 03, 2005 11:57AM
Re: DataReader Behavior
February 03, 2005 12:54PM
February 03, 2005 05:13PM
February 04, 2005 08:11AM
February 04, 2005 08:56AM
February 04, 2005 08:49PM
February 05, 2005 09:25AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.