第11行第2列的Oracle Forms-Error 103遇到期望的符号USER_PASSWORD

时间:2017-11-13 04:14:24

标签: oracle oracleforms

declare

    v varchar2(3);
begin 
    select 'x'
    into v
    from user_details
    where
    USER_NAME = login.USER_NAME;
'and'
    USER_PASSWORD = login.USER_PASSWORD;

    if sql%found then
        open_form('D:\CREDEN SOFT\MENU\MAIN.FMX');

    end if;
    exception

    when no_data_found then 
    message('invalid user name or password....!');
    end;

1 个答案:

答案 0 :(得分:0)

请检查下面我修改过的代码(虽然未经过测试),但请注意,您必须添加一列而不是x(并确保变量的长度正确3可能很小)

declare    
    v varchar2(3);
begin 
    select 'x'
    into v
    from user_details
    where
    USER_NAME = login.USER_NAME
    and
    USER_PASSWORD = login.USER_PASSWORD;

    if v is not null then
        open_form('D:\CREDEN SOFT\MENU\MAIN.FMX');

    end if;

    exception
    when no_data_found 
    then DBMS_OUTPUT.PUT_LINE('invalid user name or password....');

    end;