TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mike Jonson
NA
239
193.6k
Operand type clash: uniqueidentifier is incompatible with numeric
Jun 23 2011 2:01 AM
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;
}
Reply
Answers (
9
)
Connecting to a DATABASE in visual studio 2010
How to create background process / tray application