2
Answers

Hi, Please help me resolve this error.

Deepali Patil

Deepali Patil

11y
1.3k
1
Error is : {"Could not find stored procedure 'EmpLogin'."}

MyCode is :
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connection"].ToString());
            con.Open();
            query = "EmpLogin";
            SqlCommand cmd = new SqlCommand(query,con);
            cmd.CommandType = CommandType.Text;
            cmd.Parameters.AddWithValue("@UserName", txtUserName.Text.ToString());
            cmd.Parameters.AddWithValue("@Password", txtPassword.Text.ToString());

            int usercount = (Int32)cmd.ExecuteScalar();


Answers (2)