// JP opened flex table

Click to See Complete Forum and Search --> : preparedStatement


mukten
December 14th, 2001, 09:42 AM
Hi ,
I have a query for which I need to use PreparedStatement .The query runs likes this :-

String str = " Select ? , ename from emp where deptno ? ";

The values of ? need to be assigned dynamically.
But I cannot create Prepared Statement from this query .

If you have got answer to your questions can you inform me at


Thanks in advance

dlorde
December 14th, 2001, 11:55 AM
Why can't you create a PreparedStatement from that query?

Are you asking how to create a PreparedStatement? If so, the first place to look is the JavaDoc for PreparedStatement : http://java.sun.com/j2se/1.3/docs/api/java/sql/PreparedStatement.html. Here you'll find an example.

Dave

//JP added flex table