problem with sql statement using vb.net
- by newBie
hi
i got some problem
i got this 3 line statement:
Dim infoID As Integer = objCommand1.ExecuteScalar()
Dim strSQL2 As String = "insert into feedBackHotel (infoID, feedBackView) values(" + infoID + ",'" + FeedBack + "')"
Dim objCommand2 As New SqlCommand(strSQL2, conn)
objCommand2.ExecuteNonQuery()
the problem here is..the strSQL2 can capture the infoID from previous statement,
but it didnt insert into the database. it will pop out this error
"Conversion from string "insert into feedBackHotel (infoI" to type 'Double' is not valid."
in both table related, use same data type (int)
but for the feedBackHotel's infoID i allow it to be null..bcoz if i make it not null, it will show another error..
im using vb.net ..can anyone help?