insert new record into SQL not working
Posted on 2012-03-10
I am trying to create a small software license database and when i try and insert a new record using
Dim connstring As String = Nothing
Dim sqlconn As New SqlConnection
Dim sqlcmd As New SqlCommand
connstring = "server=simon-pc;database=licenses;trusted_connection=yes;"
sqlconn.ConnectionString = connstring
sqlcmd.Connection = sqlconn
sqlcmd.CommandText = "insert into licenses (Manuafacture, appname, version, username, ci, license, po, invoice, date_logged) values(" & manufacturerCb.SelectedValue & "," & _
applicationNameCb.SelectedValue & "," & verstionTxt.Text & "," & assignedUserTxt.Text & "," & machineNameTxt.Text & "," & licenseKeyTxt.Text & "," & poNumberTxt.Text & "," & _
invoiceNumberTxt.Text & "," & dateloggedDtp.Value & ");"
I receive the error message
Incorrect syntax near ','.
using VS2010 in the autos window the last place this gets to is version.
Can anyone shed any light on to why I am getting this please?