I am new to the web services and i want to get records from database SQL Server, against SELECT * from Detailed WHERE Email ='" + Email + "' and Password='" + Password + "' "
Here is my code but when i debug my webservices it gives me error i Have wasted lot of time on it but i didn't get any idea how to sort out this problem
[WebMethod]public DataSet getUserProfile(string Email, string Password)
{
SqlConnection NewCon;
NewCon = Class1.GetConnection();
NewCon.Open();
SqlCommand cmd = new SqlCommand("SELECT * from Detailed WHERE Email ='" + Email + "' and Password='" + Password + "' ", NewCon);
SqlDataAdapter da = new SqlDataAdapter(cmd);
// SqlDataReader dr= new SqlDataReader();
DataSet ds = new DataSet();
da.Fill(ds);
NewCon.Close();
return ds;
}