This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Abe, The database is complaining about the first question mark (the one after the keyword top.) In JDBC, you can't substitute just any part of the SQL in through a prepared statement. Basically, you can only put a value in (for the where clause.) You are going to need to build the first part of the statement dynamically.