H - I appreciate any help on this...
This works:
But this doesn't work:
Error Message: Must declare the scalar variable "@x".
Any ideas where I'm going wrong trying to insert my variable x?
Thanks again
This works:
Dim cmd2 As New SqlCommand("INSERT INTO tblRep (project, remdev) VALUES ('" & ProjectIDComboBox.Text & "', '2')", cs)
cmd2.ExecuteNonQuery()
But this doesn't work:
Dim x as integer
x = 2
Dim cmd2 As New SqlCommand("INSERT INTO tblRep (project, remdev) VALUES ('" & ProjectIDComboBox.Text & "', @x)", cs)
cmd2.ExecuteNonQuery()
Error Message: Must declare the scalar variable "@x".
Any ideas where I'm going wrong trying to insert my variable x?
Thanks again