hello sir, i am new in vb.net.. i am making a project on railway reservation.. in train booking page, there are multiple textbox in my project to insert multiple passenger name for reservation.. i want to book train in one click... so, i have to insert all the passenger name in a sinle field of a table, but in multiple rows of the field.. i don't know what will be the code to insert multiple record in a single fild at a time.. can anyone pls help me??
thanks in advance...
pri.chakraborty
0
Newbie Poster
Recommended Answers
Jump to PostDo you mean string concatenation?
Jump to PostA typical statement to insert multiple rows at a time looks like
INSERT INTO table (fldname1, fldname2, fldname3) VALUES(val1, val2, val3), (val4, val5, val6), (val7, val8, val9)
Just modify for your particular database columns.
Jump to PostI can't imagine why it is complaining about a missing semi-colon, especially since it isn't necessary to have one in a single line statement. Try omitting it completely. As a tip, try formatting the statement as
str = "INSERT INTO table1 (name)" & " VALUES('" & TextBox1.Text …
All 9 Replies
ddanbe
2,724
Professional Procrastinator
Featured Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
pri.chakraborty
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
ryanjayson
-4
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
pri.chakraborty
0
Newbie Poster
Danilo_4
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.