Operand type clash: uniqueidentifier is incompatible with numeric
I have create next Method and every time error: Operand type clash: uniqueidentifier is incompatible with numeric. I vant undestand why. Please help.
public object GetCredits(string idDebitor)
{
ArrayList allCredits = new ArrayList();
using (SqlConnection con = new SqlConnection(conectionString)) //???????????? ? ??
{
string query = string.Format("select * from Credits where DebitorID={0}", idDebitor);
SqlCommand com = new SqlCommand(query, con); //??????? ???????? ???????
//try
{
con.Open(); //????????? ??????????
SqlDataReader dr = com.ExecuteReader(); //????????? ?????? ?? ??????? ? ?????????? dr
if (dr.HasRows) //???? ??????? ?? ??????, ????????? ? ??????
foreach (DbDataRecord result in dr)
allCredits.Add(result);
}
//catch
{ }
}
return allCredits;
}