locked
3-tier architecture with Oracle 10g RRS feed

  • Question

  • Hello,
           I am developing a 3-tier based website having Oracle 10g DB at back end. Firstly, i created a pl/sql stored procedure as:
    -----------------------------------
    create or replace procedure CheckLogin(u_name in varchar2, u_pwd in varchar2,is_admin in number) is
    uname varchar2(30);
    upwd varchar2(30);
    begin
     if (is_admin = 0) then
        select user_name,password into uname,upwd from cms_users_login
               where user_name = u_name and password = u_pwd;
     else
         select admin_name,password into uname,upwd from cms_admin_login
               where admin_name = u_name and password = u_pwd;
     end if;
    end CheckLogin;
    -----------------------------------------------------------------------------------
    then i created a DAL (Login.xsd). It contains a query as "CheckLogin" having three parametes: username,password and is_admin.

     LoginBLL contains a function to verify login as:
    ---------------------------------------------------------
     [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
        public Login.CHECKLOGINDataTable VerifyLogin(string username, string userPwd, int? is_admin)
        {
            return Adapter.CheckLogin(username, userPwd,ref is_admin);
        }
    -----------------------------------------------------------------------------------
    now when i run the login page and enter login info, it gives error
    " PLS-00222: no function with name  exists in this scope; ORA-06512: No data found "
    Please help....what to do?

    Thank you.
    Tuesday, April 21, 2009 1:20 PM