注册 登录
编程论坛 PowerBuilder

求助(打开不了窗口)

a547504006 发布于 2011-12-14 23:35, 855 次点击
经测试,没报错。不过在运行的时候,窗口打开不了。

全军变量定义了     就是这句(string gs_id,gs_mm,gs_quanxian,gi_quanxian)



string ls_username,ls_password

ls_username=trim(sle_id.text)
ls_password=trim(sle_password.text)
if ls_username="" or ls_password="" then
    messagebox("提示","用户名和密码不能为空")
   
   
   
else

   
    SELECT "personal_information"."id", "personal_information"."quanxian", "personal_information"."mm"
    INTO :gs_id,:gs_mm,:gs_quanxian
    FROM "personal_information"

   
   
    WHERE ( "personal_information"."id"=:ls_username   ) AND
          ( "personal_information"."mm" =:ls_password  );
            gi_quanxian=trim(gs_quanxian)
            
      if sqlca.sqlcode=0 then
    if gi_quanxian ='1' then
          open(w_yuangong_main)
    elseif gi_quanxian ='2' then
          open(w_admin_main)
    elseif gi_quanxian='3' then

         open(w_shangji_main)
        
        close(w_login)
end if
else


   end if

end if



3 回复
#2
zhentong5202012-01-13 13:37
你的语句没错  你看是不是哪个单词写错了 或者是多了少了
#3
大湖2012-02-11 21:08
debug一下
#4
shimengquan2012-11-06 17:01
SELECT "personal_information"."id", "personal_information"."quanxian", "personal_information"."mm"
INTO :gs_id,:gs_mm,:gs_quanxian
     FROM "personal_information"
 
   
   
    WHERE ( "personal_information"."id"=:ls_username   ) AND
           ( "personal_information"."mm" =:ls_password  );
         
改为:
 select id,quanxian,mm
     into :gs_id,:gs_mm,:gs_quanxian
     FROM "personal_information"
    WHERE ( "personal_information"."id"=:ls_username   ) AND
           ( "personal_information"."mm" =:ls_password  );

            

1