kerek2 10 Junior Poster

Hi Sir,

I'm trying to use oracle Stored Produce with my login form as below :-

package cms is
    -- 1 => OK, 0 => ERROR

    function validateUser(  username    in  cms_user.cu_username%TYPE,
                            passwd      in  varchar2,
                            errmsg      out varchar2 )
                    return number;


For info , my password is encrypted , so i just want to check whether the passowrd correct or not and then will return value 0 or 1.

Here my code :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        Dim oracmd As New OracleCommand
        oracmd.Connection = conn
        oracmd.CommandText = "cms.validateUser( username, passwd, msg )"
        oracmd.CommandType = CommandType.StoredProcedure
        oracmd.Parameters.Add(New OracleParameter("username", OracleType.VarChar)).Value = TxtUsername.Text.Trim
        oracmd.Parameters.Add(New OracleParameter("passwd", OracleType.VarChar)).Value = TxtPassword.Text.Trim
        '  oracmd.Parameters.Add(New OracleParameter("msg", OracleType.VarChar)).Value = Label1.Text.Trim

        oracmd.Parameters.Add("msg", OracleType.VarChar).Value = Label1.Text

        oracmd.Parameters("msg").Direction = ParameterDirection.Output

    End Sub

and got this Error :

    ORA-06550: line 1, column 7:
    PLS-00801: internal error [22503]
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

Can anyone guide me what to do yaa ? thank you in advance

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.