![]() |
C# with SQL [Window Forms Help]
Hello Every C# PRogrammer and Others:
I need help in C# database programming. i need to save textbox text into table of c# Here is code Code:
// create commandbut when i execute this always Getting Error: as incorrrect Syntex. Any Help suggestion |
Re: C# with SQL [Window Forms Help]
yes, you will get an error of Incorrect Syntax, because the Insert statement is not correct.
The correct syntax would be: 1] If you want to insert all values Code:
"insert into emp values('"+txtid.Text+"','"+txtname.Text+"','"+txtdesig.Text+"','"+txtsal.Text+"','"+txtjoin.Text+"','"+txtadd.Text+"','"+txtjoin.Text+"','"+txtcont.Text+"');";Code:
"insert into emp(id,name,desig,sal) values('"+txtid.Text+"','"+txtname.Text+"','"+txtdesig.Text+"','"+txtsal.Text+"');"; |
Re: C# with SQL [Window Forms Help]
Issue Solved THanks Mate:
|
| All times are GMT +5.5. The time now is 03:36. |