I am testing a webservice locally that connects to BankingDb and
check the function
[WebMethod]
public bool CheckPincode(string Pincode)
{
SqlConnection sqlConnection1 =new
SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand("SELECT acc_pincode FROM
Accounts WHERE acc_pincode=@PINCODE",sqlConnection1);
cmd.Parameters.AddWithValue("@PINCODE", Pincode);
sqlConnection1.Open();
Object obj = cmd.ExecuteScalar();
string result = obj.ToString();
sqlConnection1.Close();
if (result == Pincode)
return true;
else
return false;
}
It gives the above exception. how do i fix this ? I think it has
something to with user rights? The table might be created on different
users. How do i find out the users on my db and and create priveleges
and access them etc. etc. and solve my problem.