Dim addcards As String
Dim cardnum As Integer
Dim Peopleid As Integer
cardnum = TextBox4.Text
Peopleid = TextBox5.Text
addcards = "INSERT INTO Cards (Card_Number, People_ID) VALUES (" + cardnum + ", " + peopleid + ")"
OleDbCommand3.CommandText = addcards
but this does
Dim addcards As String
Dim cardnum As Integer
Dim Peopleid As Integer
cardnum = TextBox4.Text
Peopleid = TextBox5.Text
addcards = "INSERT INTO Cards (Card_Number, People_ID) VALUES (" + "1014" + ", " + "1528" + ")"
OleDbCommand3.CommandText = addcards
I keep getting the error of:
An unhandled exception of type 'System.InvalidCastException' occurred in microsoft.visualbasic.dll
Additional information: Cast from string "INSERT INTO Cards (Card_Number, " to type 'Double' is not valid.
