but what if i'm inserting a string value in a sequence.. then i just want to give ps.setString(1,""); it will insert but now i want to give the integer value so which one i can use.. please help me ranchers..
thanks in advance.. regards Megha!!
stu derby
Ranch Hand
Joined: Dec 15, 2005
Posts: 333
posted
0
No, no, no. The SQL generates and inserts the value for you; you don't have to supply and bind a value to your PreparedStatement
[ May 26, 2006: Message edited by: stu derby ]
Megha Rajeevan
Greenhorn
Joined: Mar 22, 2006
Posts: 24
posted
0
Thank you ranchers.. this query is working fine.. but there is a problem also.. if i want to get the current value of the sequence.. what to do
i don't kjnow whether it is true.. just put a trial.. but it is showing the error.. java.sql.SQLException: [Oracle][ODBC][Ora]ORA-08002: sequence LOGIN_ID.CURRVAL is not yet defined in this session
but if i'm giving the nextval.. it is working fine.. how to fix this problem.. please help me ranchers..