Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
All-Star
15571 Points
2700 Posts
Apr 06, 2012 04:08 PM|LINK
Change this:
int numrow=con.ExecuteNonQuery();
To this:
int numrow=cmd.ExecuteNonQuery();
And get rid of this (even though it has nothing to do with the error... it isn't doing anything in fact, which is why you should get rid of it):
SqlCommand myCom=new SqlCommand(st,con);
TabAlleman
All-Star
15571 Points
2700 Posts
Re: ExecuteNonQuery error
Apr 06, 2012 04:08 PM|LINK
Change this:
int numrow=con.ExecuteNonQuery();
To this:
int numrow=cmd.ExecuteNonQuery();
And get rid of this (even though it has nothing to do with the error... it isn't doing anything in fact, which is why you should get rid of it):
SqlCommand myCom=new SqlCommand(st,con);