pb入门,遇到问题请教

lyq 2007-05-17 02:30:44
各位高手请教
做登录窗体,
用户名称(下拉),密码(输入)
现在用户名称用的dw_1 ,关联用户表,在登录时我写如下代码,没实现预期效果

string ls_select
string username
string userpsd
integer li_row

li_row = pick_user.getrow()
if li_row >=1 then
username=pick_user.Describe(username+".dddw.datacolumn") -此处为啥不对
userpsd=pick_user.Describe(username+".dddw.displaycolumn")-此处为啥不对
if userpsd=user_psd.text then
open(mainform)
else
messagebox('系统提示','您输入的密码不正确')
end if
end if
...全文
255 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
lllyyymmm 2008-06-12
  • 打赏
  • 举报
回复
马上结
sun1976 2008-06-11
  • 打赏
  • 举报
回复
还不结贴?
s1240s1240 2007-05-17
  • 打赏
  • 举报
回复
直接用dw.getietmstring()不就完了吗,密码列不显示
sun1976 2007-05-17
  • 打赏
  • 举报
回复
建议不用这种检测方法,容易被突破,跟踪内存能找到正确口令
一般输入口令
然后
select count(*)
into :ll_cnt
from 你的用户表
where user=:选择的用户 and password=:输入的口令
;
if isnull(ll_cnt) then ll_cnt=0
if ll_cnt<1 then
//不成功
else
//成功
end if
sun1976 2007-05-17
  • 打赏
  • 举报
回复
pick_user.Describe(username+".dddw.datacolumn")
得到的是下拉数据窗口的数据列的列名称,而不是那一列保存的值
lyq 2007-05-17
  • 打赏
  • 举报
回复
一会儿改完程序结贴
lyq 2007-05-17
  • 打赏
  • 举报
回复
多谢
niexiancheng 2007-05-17
  • 打赏
  • 举报
回复
简单的写了一下,你那样写是肯定有问题的
niexiancheng 2007-05-17
  • 打赏
  • 举报
回复

string ls_select
string username
string userpsd
integer li_row

li_row = pick_user.getrow()
if li_row >=1 then
username=pick_user.Describe(username+".dddw.datacolumn") -此处为啥不对
--此处肯定不对
username = pick_user.object.username[li_row]
userpsd = pick_user.object.userpsd[li_row]
select userpsd into :pwd from username where username = :username;
userpsd=pick_user.Describe(username+".dddw.displaycolumn")-此处为啥不对
if userpsd=pwd then
open(mainform)
else
messagebox('系统提示','您输入的密码不正确')
end if
end if

1,079

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧