Hello everyone, i'm new here but i've been having a problem lately with a sql query inside the code i'm writing, and i don't know what else to do. I've been trying to retrieve data from a table, and i want to use a variable for the "where" field in the SQL query, but it keeps saying that the data are not the same type. Here it is:
Dim cmdimp As New OleDb.OleDbCommand("select * from importer where cod_importer='" & codimporter & "'", conn)
The point is, i need it to be an integer because the primary key is the same, but i can't figure out how to specify it. I hope i posted this on the aproppiate place, and if not, i apologize, but i didn't have much time to go through it. All help will be appreciated. Thank you all.