初到PB 发表于 2006-12-23 17:39

[求助]密码登录问题

已经通过用ODBC的连接,在登录窗口中,总是提示密码错误,已经检查了,从sql2000数据库中取得的数据和输入的一样,就是老是提示错误,请高人指教。

初到PB 发表于 2006-12-23 23:13

<P>没有人会吗?????????????????</P>

黑暗天使 发表于 2006-12-28 09:28

把语句发上来看看,你说的不清楚

初到PB 发表于 2006-12-28 18:06

<P>ls_user=user.text</P>
<P>Select pass</P>
<P>Into : ls_password</P>
<P>From password</P>
<P>where name=:ls_user;</P>
<P>If user.text="" or password.text="" then<BR>    <BR>    messagebox("","用户名或密码不能为空!")<BR>    <BR> return<BR> <BR>End if</P>
<P>if password.text=ls_password then<BR>    <BR>    open(w_main)<BR>    <BR>    close(w_password) <BR>    <BR> else<BR>    <BR>    messagebox("","用户名或密码错误!")<BR>    <BR>end if<BR>是和 sql2000 连接的数据库,和PowerBuilder自带的数据库就没有问题</P>

黑暗天使 发表于 2006-12-29 10:33

提示的错误是什么?

路過 发表于 2007-1-15 16:15

這麼都沒有下文啦

notbig 发表于 2007-1-15 23:47

<P><BR>If user.text="" or password.text="" then<BR>    <BR>    messagebox("","用户名或密码不能为空!")<BR>    <BR>return</P>
<P>End if<BR>ls_user=user.text</P>
<P>Select pass</P>
<P>Into : ls_password</P>
<P>From password</P>
<P>where name=:ls_user;</P>

<P>if trim(password.text)=trim(ls_password) then<BR>    <BR>    open(w_main)<BR>    <BR>    close(w_password) <BR>    <BR>else<BR>    <BR>    messagebox("","用户名或密码错误!")<BR>    <BR>end if<BR></P>

页: [1]

编程论坛