In a PreparedStatement you can only use ? as placeholders for data items in the "where" clause of your SQL statement. You cannot use ? as placeholders for column or table names.
You'll need to include the column and table name directly in your statement, for example: