我正在使用一个SQLConnection执行SQL查询,以确定我需要更新此表的哪些行。这是通过while循环实现的
Using q As SqlClient.SqlDataReader = AdditionQuery.ExecuteReader()
While q.Read()
'Here is where I need to perform an update
End While
End Using
我是否需要初始化与数据库的新连接以在此处执行更新?我尝试过使用open连接,但这似乎没有执行更新......
非常感谢提前。
使用DataAdapter和一个查询废弃此方法。谢谢大家。