I'm not sure if I'm mailing the right group, so apologies if I'm mailing
the wrong people.
I'm trying to use a prepared statement to query a table. The name of the
table to be queried, is passed into the prepared statement.
Here's a sample of my code:
stmt = oraConn.prepareStatement(SDO_FILTERS);
ors = (OracleResultSet) stmt.executeQuery();
- - - - - - - - - - - - - - - -
public static final String SDO_FILTERS =
"SELECT * FROM ? ";
When I run the code I get an invalid table name error. I think that the
problem might be that the setString method stores the tableName with
inverted commas around it.
Can anybody suggest a way around this problem please ?
Thanks in advance,
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!