# Re: 谁来帮帮忙，谢谢！

Posted by Tryit on March 15, 1999 at 15:56:31:

In Reply to: 谁来帮帮忙，谢谢！ posted by jojo on March 13, 1999 at 01:32:16:

: 请问我的程式这样写有问题吗？为何程式跑到最后就停了？

: gsSqlDesc = ""
: If strOpType = "ADD" Then
: gsSqlDesc = gsSqlDesc + "Insert into TBL_Back Values ( '"
: gsSqlDesc = gsSqlDesc + txtLoad + "','" + txtNum + "','" + txtArch + "','"
: gsSqlDesc = gsSqlDesc + Date8to10(txtDate) + "'," + txtPe + ",'" + txtNam + "','"
: gsSqlDesc = gsSqlDesc + txtPlac + "')"
: End If
: If strOpType = "UPT" Then
: gsSqlDesc = gsSqlDesc + "UPDATE TBL_Back SET Num='" + txtNum + "'"
: gsSqlDesc = gsSqlDesc + " WHERE Load= '" + txtLoad + "' AND Arch= '" + txtArch
: gsSqlDesc = gsSqlDesc + "' AND DATE= '" + Date8to10(txtDate) + "' AND Pe='"
: gsSqlDesc = gsSqlDesc + txtPe + "' AND Plac=" + txtPlac
: End If
: GblDB.Execute (gsSqlDesc)-----------停在这里

方法１:
先在前面加上Error Handle处理段
db execute 后面可加dbFailOnError
若有错误发生，可由错误代码找出问题点

方法２:
加Breakpoint Trace，display 最后的SQL Statement，也许会有你想不到的结果吧

Follow Ups: