本文介绍了嗨,我得到错误,读取器关闭时无效尝试调用读取。请帮我的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

dt = Date.Today

mobj.slct(select * from Books_not_returned where Return_date<'+ dt +')

while mobj.dr 。阅读

Dim i



Dim a = mobj.dr(0)

Dim b = mobj.dr(1)

Dim c = mobj.dr(2)

Dim d = mobj.dr(3)

Dim f = mobj.dr(4)

g = mobj.dr(5)

h = mobj.dr(6)

i = 5



mobj.execute(更新Books_not_returned set fine ='+ i.ToString +'其中Member_ID ='+ a.ToString +'和Book_ID ='+ c.ToString +')

结束时

dt = Date.Today
mobj.slct("select * from Books_not_returned where Return_date <'" + dt + "'")
While mobj.dr.Read
Dim i

Dim a = mobj.dr(0)
Dim b = mobj.dr(1)
Dim c = mobj.dr(2)
Dim d = mobj.dr(3)
Dim f = mobj.dr(4)
g = mobj.dr(5)
h = mobj.dr(6)
i = 5

mobj.execute("update Books_not_returned set fine ='" + i.ToString + "' where Member_ID='" + a.ToString + "' and Book_ID='" + c.ToString + "'")
End While

推荐答案


这篇关于嗨,我得到错误,读取器关闭时无效尝试调用读取。请帮我的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 16:36