请问这个VB6.0的代码怎么转换成VB.NET代码?谢谢!

Ifrs70.State=1Thenrs70.Closers70.Open"驱动成品入库where入库单号='"+rs1.Fields("入库单号")+"'",Cnn,a... If rs70.State = 1 Then rs70.Close
rs70.Open "驱动成品入库 where 入库单号='" + rs1.Fields("入库单号") + "'", Cnn, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs70.RecordCount > 0 Then

If Val(rs70.Fields("审核数量")) = Val(rs70.Fields("入库数量")) Then

If rs6.State = 1 Then rs6.Close
rs6.Open "select * from RDrecord where ID='" + rs1.Fields("U8029入ID") + "'and cHandler is null and dVeriDate is null order by ID desc", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs6.RecordCount > 0 Then
CnnU8.Execute ("update RDrecord set cHandler='" + czy + "' ,dVeriDate='" + Str(Date) + "'where ID='" + rs1.Fields("U8029入ID") + "'and cHandler is null and dVeriDate is null ")

If rs7.State = 1 Then rs7.Close
rs7.Open "select * from RDrecords where ID='" + rs1.Fields("U8029入ID") + "' order by ID desc", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs7.RecordCount > 0 Then

For p = 1 To rs7.RecordCount

If rs8.State = 1 Then rs8.Close
rs8.Open "select * from CurrentStock where cInvCode='" + rs7.Fields("cInvCode") + "'and cwhcode='06'order by cInvCode", CnnU8, adOpenKeyset, adLockOptimistic '查询操作员信息
If rs8.RecordCount > 0 Then
CnnU8.Execute ("update CurrentStock set finQuantity='" + Replace(Str(Val(rs8.Fields("finQuantity")) - Val(rs7.Fields("iQuantity"))), " ", "") + "',iQuantity='" + Replace(Str(Val(rs8.Fields("iQuantity")) + Val(rs7.Fields("iQuantity"))), " ", "") + "' where cInvCode='" + rs7.Fields("cInvCode") + "'and cwhcode='06'")
End If
rs8.Close

rs7.MoveNext
Next p

End If
rs7.Close

MsgBox "自动审核成功!", 48, "成功"
End If
rs6.Close

End If

End If
rs70.Close
展开
 我来答
百度网友bdb9803
2015-07-14 · TA获得超过1.1万个赞
知道大有可为答主
回答量:1.1万
采纳率:53%
帮助的人:1亿
展开全部
VB6和vb.net的数据库操作有很大不同,不能简单的语句对语句转换,建议你深入了解vb.net的数据库操作,再做移植
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式