📄 18769.html
字号:
<html> <head> <title>请教这个程式错在那里?</title> </head> <body bgcolor="#FFFFFF" vlink="#808080"> <center> <h1>请教这个程式错在那里?</h1> </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by kkcheung on September 10, 1999 at 16:18:33:<p>selstr = "select * from sale_rec where sale_date like '" + Trim(T_FROM.Text) + "%'"<p>Set tempset = FMSDB.OpenRecordset(selstr, dbOpenSnapshot, dbSQLPassThrough)<br>If tempset.EOF Then<br> MsgBox "在指定条件下无查询资料 !", , FRM_KHGH_Q_P.Caption<br> MSG_BAR.Caption = ""<br> Exit Sub<br>End If<br>Do While Not tempset.EOF<br>temp_inv = Trim(tempset.Fields!invo_code): temp_lot = Trim(tempset.Fields!stockno)<p>selstr2 = "select * from receive_rec where stock_no='" + temp_lot + "'"<br>Set tempset2 = FMSDB.OpenRecordset(selstr2, dbOpenSnapshot, dbSQLPassThrough)<p>If Not tempset2.EOF Then<br>temp_sendcode = Trim(tempset2.Fields!send_code)<br>sqlSTR = "UPDATE sale_rec SET send_code= '" + temp_sendcode + "' WHERE invo_code='" + temp_inv + "' and stockno='" + temp_lot + "'"<br>BeginTrans<br>FMSDB.Execute sqlSTR, dbSQLPassThrough<br>End If<p>tempset.MoveNext<br>tempset2.Close<br>Loop<br>上面的程式可以顺利执行到第一次loop后,当第二次执行Set tempset2 = FMSDB.OpenRecordset(selstr2, dbOpenSnapshot, dbSQLPassThrough),就出现ODBC-call failed 3146.我作程式追踪,selstr2这句是完整的,抄到visdata亦可执行,但在这里却过了,请教问题出在那里.谢谢大家!<br><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 18769--><!--top: 18802--><li><a href="18802.html">Re: 请教这个程式错在那里?</a> <b>阿拉</b> <i>13:28:58 9/11/99</i>(<!--responses: 18802-->1)<ul><!--insert: 18802--><!--top: 18878--><li><a href="18878.html">Re: 请教这个程式错在那里?</a> <b>kkcheung</b> <i>16:17:18 9/13/99</i>(<!--responses: 18878-->0)<ul><!--insert: 18878--></ul><!--end: 18878--></ul><!--end: 18802--></ul><!--end: 18769--><br><hr size=7 width=75%><p></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -