oledbcommand的问题
我想打开表中的一行之前,先根据返回的ID更新一下,然后再打开,应该怎么做呢?
这样放两个oledbcommand在一起是不行??
以下内容为程序代码,可是却有错误:
dim upcomm As New oledbcommand("update article set hits=hits+1 where ID="& id ,myconn)
upcomm.executenonquery()
upcomm.close()
Dim mycomm As New oledbcommand("select * from article where articleid="& id ,myconn)
Dim dr As oledbdatareader = mycomm.Executereader()
If dr.read() Then
.......
end if