请教vfp数据保存的问题?
泽韦德 2005-06-01 03:47:10 m1=alltrim(thisform.txtClass.value)
m2=alltrim(thisform.txtName.value)
if m1==""
messagebox("代码不能为空!",0+48+0,"图书管理系统")
thisform.txtClass.setfocus
return
endif
if m2==""
messagebox("类别不能为空!",0+48+0,"图书管理系统")
thisform.txtName.setfocus
return
endif
dimension RecNum(1)
RecNum=0
select count(*) from 类别信息 where 类别代码=m1 into array RecNum
if RecNum==1
messagebox("代码已存在!",0+48+0,"图书管理系统")
thisform.txtClass.value=""
thisform.txtName.value=""
thisform.txtClass.setfocus
return
endif
RecNum=0
select count(*) from 类别信息 where 书籍类别=m2 into array RecNum
if RecNum==1
messagebox("类别已存在!",0+48+0,"图书管理系统")
thisform.txtClass.value=""
thisform.txtName.value=""
thisform.txtName.setfocus
return
endif
begin trans
insert into 类别信息 values(m1,m2)
end trans
messagebox("添加成功!",64,"图书管理系统")
thisform.init
thisform.refresh
当我完成上面的操作时,vfp会自动出现系统提示Data has been changed,would you like to save changes?
可以我不想让它这么提示,应该什么设置才能让它自动保存数据.