Hi :)
I apologize, slightly off-topic. I'm hoping a few people here have worked with JDBC.
Having trouble with my preparedStatment. I'm trying to assign a value to my
placeholder.The SQLException is raised. Error ORA-00903 Invalid table name. Here's
some of the code.
PreparedStatement pstmt = conn.prepareStatement("Select * from ?"); pstmt.setString(1,
"name_of_table");
ResultSet rset = pstmt.executeQuery();
I've tried using different table names. No luck. I also tried assigning the value to a
String first (i.e String tab_name = "name_of_table";). No luck. I've also tried
PreparedStatement pstmt = conn.prepareStatement("Select column1 from ?"); In case the
'*' was causing a problem. Still no luck. Is it even possible to dynamically assign
the name of a table with a PreparedStatement?? Am I forgetting something??
Tia,
-Robert-
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html