请教这个update不管用
用的数据环境添加数据表。用关键字查找是否已存在记录,存在的话提示是否修改,不存在插入新记录,下面这样写的用不了,无提示。,请教这是怎么回事??谢谢
程序代码:With Thisform
If Isblank(Alltrim(Thisform.txt号.Value))
Messagebox('请输入关键字内容!!!',64,'提示:')
Return
Else
GO TOP
SEEK Alltrim(Thisform.txt号.Value)
If FOUND()
nAnswer=Messagebox('要修改吗!!!',1+64+256,'提示:')
Do CASE
Case nAnswer=1
Update material SET 号=Alltrim(Thisform.txt号.Value),c=Alltrim(Thisform.txtC.Value) from material Where Alltrim(Thisform.txt号.Value)==号
Thisform.Refresh
Case nAnswer=0
Return
Endcase
Else
Insert Into material (号,c) VALUES (Alltrim(Thisform.txt号.Value),Alltrim(Thisform.txtC.Value))
Thisform.txt号.Value=""
Thisform.txtC.Value=""
Thisform.Refresh
Endif
Endif
Endwith
[ 本帖最后由 freejike 于 2014-1-5 16:14 编辑 ]




