Reputation: 1518
I am trying to inserting value enter in textbox into table like this
"INSERT INTO guestpasstypes(guestPassType_Name) VALUES('"+tbPassType.Text"'");
it was giving error like ";" missed
Upvotes: 0
Views: 159
Reputation: 25465
If your going to carry on with this type of programming use
"Insert INTO guestpasstypes(guestPassType_Name)values('"+tbPassType.Text"')";
Otherwise, you should definitely look into sanitizing your sql.
Upvotes: 0
Reputation: 11309
"Insert into guestpasstypes (guestPassType_Name) values ('" + tbPassType.Text + "')"
Upvotes: 2
Reputation: 6867
INSERT INTO guestpasstypes(guestPassType_Name) VALUES ('"+tbPassType.Text+"')"
The second quote should be outside the parantheses
Upvotes: 0
Reputation: 4978
You are missing a concatenation operator:
"Insert INTO guestpasstypes(guestPassType_Name)values('" + tbPassType.Text + "');";
Upvotes: 1