0
I have a test program consisting of a textbox (textbox1), a button (save), and a connection to a database and a table called TestDatabase.mdf and TestTable (respectively). I am trying to save the text which I will input into the database through 'textbox1'....
I have done this much so far:
Dim mytextboxvalue As String
mytextboxvalue = TextBox1.Text
sqCmd.CommandText = "INSERT INTO TestTable" & "(FirstColumn, SecondColumn)" & "(mytextboxvalue,mytextboxvalue)"
And I am getting this run-time error:
Incorrect syntax near 'mytextboxvalue'.
So my question is that what is the correct syntax?
Where is TextBox1.Text defined? – Joe Taylor – 2012-02-20T09:47:43.573