Hi and greetings!

Im trying to learn a bit of SQl through jdbc. at present i have a little problem concerning constructing a SELECT statement including a variable. salary which is declared as an integer.

when i use this statement

String thisQuery = "SELECT* FROM EmployeeTable WHERE EmployeeSalary > 25000";

everything works well and i get the expected output. However when i use this statement: -

String thisQuery = "SELECT* FROM EmployeeTable WHERE EmployeeSalary > '"+salary+"'";

i get a data type mismatch error namely

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

Clearly im doing something totally wrong building my string but i cant see for the life of me what is is.

Could some kind soul please kick me in theright direction

ta
John