在VFP中对一个表(自带的)进行增删改查的语句

发布时间:2024-05-26 13:51 发布:上海旅游网

问题描述:

最好给给些代码!!!在线等。。。
是增加,删除,修改按钮单击事件里面的代码,谢谢!
备注就是备注类型,婚否是逻辑类型 数据环境没有表我建了一个表人事管理表(rsgl)

问题解答:

添加
if messagebox("是否确定要保存修改的信息?",4+32,"请确认")=6
replace 编号 with val(allt(thisform.text1.value))
replace 姓名 with allt(thisform.text2.value)
replace 学历 with allt(thisform.text3.value)
replace 性别 with allt(thisform.text4.value)
replace 生日 with ctod(allt(thisform.text5.value))
replace 职称 with allt(thisform.text6.value) && 建议将该字段类型改为字符型
replace 婚否 with allt(thisform.text7.value) && 建议将该字段类型改为字符型
replace 备注 with allt(thisform.edit1.value) && 假设表单的备注用编辑框控件
wait "修改的数据已经保存" window at 40,150 nowait && 用于出现提示
thisform.init
else
thisform.init
endif

修改"代码,实现取消控件的只读:
thisform.text1.readonly=.f.
thisform.text2.readonly=.f.
thisform.text3.readonly=.f.
thisform.text4.readonly=.f.
thisform.text5.readonly=.f.
thisform.text6.readonly=.f.
thisform.text7.readonly=.f.
thisform.edit1.readonly=.f.

删除"假设为command2:
go nhere
mb=messagebox("确定要删除吗?",1+64,"提示")
if mb==1
delete
pack
thisform.init
endif

我发不出来,发在空间里了
地址如下:
http://hi.baidu.com/youhhh0/blog/item/ffab03df5463f05d95ee3796.html

热点新闻