Question

Im getting error: net: unknown error 1

This is my code:

private void btnLogin_Click_1(object sender, EventArgs e)
    {
        OracleCommand cmd = new OracleCommand();
        cmd.Connection = conn;
        cmd.CommandTimeout = 0;
        cmd.CommandText = "hhrcv_logon_validation";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.Add("pv_emp_username", OracleDbType.VarChar).Value = txtUsername.Text;
        cmd.Parameters.Add("pv_emp_password", OracleDbType.VarChar).Value = txtPassword.Text;
        cmd.Parameters.Add(new OracleParameter("pv_return_message", OracleDbType.VarChar));
        cmd.Parameters["pv_return_message"].Direction = ParameterDirection.Output;
        string valid;
        conn.Open();
        **cmd.ExecuteNonQuery();**
        valid = cmd.Parameters["pv_return_message"].Value.ToString();
        if (valid.ToString() == "")
        {
            frmHome main = new frmHome(lblEmp_id_no.Text);
            main.Show();
            this.Hide();
        }
        else
        {
            MessageBox.Show("" + valid, "Error");
        }
        conn.Close();
    }

Unhandled exception on cmd.ExecuteNonQuery();

Everything was working fine till today. First time that I'm getting this.

Its not really descriptive. Can someone please assist.

Was it helpful?

Solution

Our DBAs implemented password expiry dates on our user accounts. The one we were using for the app was expired. Although I could still use the account to make the connection to DB and actually query data in the DB it didn't want to work from the app.

So issue is solved.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top