I got error like syntaxt error in update statment
strcmd="update emp set Name='"+txtname.Text+"',where id="+tsxid.Text

cmd=new OledbCommand(strcmd,con);
cmd.ExecuteNonquery();

Recommended Answers

Missing quotes around the last item tsxid.Text

Jump to Post

All 2 Replies

Missing quotes around the last item tsxid.Text

also, there's a comma before WHERE

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.