|
insert multiple values in single column from diff text boxes in dtabase using vb.net
|
|
|
|
|
Is there a question, or are you asking for permission?
|
|
|
|
|
You can concatenate all the values in the textboxes and insert them into a column. Or delimit them with a character and insert them.
Either way you can only have one piece of information inside a column.
|
|
|
|
|
try this:
Private Sub insertData()
Try
Dim con As SqlConnection = Nothing
Dim cmd As SqlCommand = Nothing
con = New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("inline").ConnectionString)
con.Open()
cmd = New SqlCommand("insert into table_name(column_Name) values ('" + TextBox1.Text + "," + TextBox2.Text + "')", con)
cmd.ExecuteNonQuery()
con.Close()
lblMsg.Text = "Saved Successfully"
Catch ex As Exception
lblMsg.Text = ex.Message
End Try
End Sub
|
|
|
|