Hi Everyone,
I am currently Building a Stock Control System for a School Project and Using access 2007 with Visual Studio 2010 to build the VB.
I am trying to use an INSERT INTO SQL Command to insert new stock items into my Access DB.
I am getting an error thrown at me when attempting to execute the NonQuery().
This is my code
Dim con as new OleDBconnection (Connection String)
Dim cmd As New OleDbCommand
Query = "INSERT INTO PROD_DB_Complete_Board (ID, [Board Size], Laminate, [Stock Level]) Values('" & TextBox4.Text & "'" & "AND" & "'" & TextBox2.Text & "'" & "And" & "'" & TextBox3.Text & "'" & "And" & "'" & TextBox1.Text & "')"
cmd = New OleDbCommand(Query, con)
MsgBox(Query)
cmd.ExecuteNonQuery()
cmd.Dispose()
con.Close()
I keep getting thrown the error, Query Values and Destination fields are not the Same.
What does this mean and how do I solve these Issues?
Many Thanks
Ziggy