"select * from tablename where fieldname = ?" is correct one,then u set the value use stmt.setString(1,fieldname) (here fieldname must be a String which match u db's column's data type)...if u got nothing,check u db's record
调试欢乐多
====================================
ORA-00936: missing expression
Cause: A required part of a clause or expression has been omitted. For example, a SELECT statement may have been entered without a list of columns or expressions or with an incomplete expression. This message is also issued in cases where a reserved word is misused, as in SELECT TABLE. Action: Check the statement syntax and specify the missing component
=====================================
and when I use '/?/' and '/?' the error is same as before: "ORA-01006: bind variable does not exist "what should I do?Thanks
stmt.setString(1,fieldname);