PB中update问题 。求高手赐教啊~~ 无错误但是运行没结果,。
功能是根据用户名从用户表中找出用户并更新此用SELECTUserlist.nameINTO:sle_1.textFROMUserlistWHEREUserlist.nam...
功能是根据用户名从用户表中找出用户并更新此用
SELECT Userlist.name
INTO :sle_1.text
FROM Userlist
WHERE Userlist.name = :sle_1.text;
if sqlca.sqlcode=0 then
UPDATE Userlist
SET name = :sle_1.text,
pwd = :sle_2.text,
sex = :ddlb_1.text,
career = :ddlb_2.text,
age = :sle_1.text,
income = :ddlb_3.text,
style = :ddlb_9.text,
hobby_travel = :ddlb_4.text,
hobby_movie = :ddlb_5.text,
hobby_sport = :ddlb_6.text,
hobby_food = :ddlb_7.text,
hobby_music = :ddlb_8.text
WHERE Userlist.name = :sle_1.text;
commit;
messagebox('','修改成功!')
else
if sqlca.sqlcode =100 then
messagebox('信息提示:','修改数据不存在,修改失败!请重新输入!')
rollback;
else
messagebox('信息提示:','修改失败!请检查!')
rollback;
end if
end if
dw_1.retrieve(); 展开
SELECT Userlist.name
INTO :sle_1.text
FROM Userlist
WHERE Userlist.name = :sle_1.text;
if sqlca.sqlcode=0 then
UPDATE Userlist
SET name = :sle_1.text,
pwd = :sle_2.text,
sex = :ddlb_1.text,
career = :ddlb_2.text,
age = :sle_1.text,
income = :ddlb_3.text,
style = :ddlb_9.text,
hobby_travel = :ddlb_4.text,
hobby_movie = :ddlb_5.text,
hobby_sport = :ddlb_6.text,
hobby_food = :ddlb_7.text,
hobby_music = :ddlb_8.text
WHERE Userlist.name = :sle_1.text;
commit;
messagebox('','修改成功!')
else
if sqlca.sqlcode =100 then
messagebox('信息提示:','修改数据不存在,修改失败!请重新输入!')
rollback;
else
messagebox('信息提示:','修改失败!请检查!')
rollback;
end if
end if
dw_1.retrieve(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询