Deepali Patil

Deepali Patil

  • 2k
  • 142
  • 52.8k

Hi, Please help me resolve this error.

Jan 15 2013 12:54 AM
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)