I was hoping that someone could assist with what I think is a pretty easy problem to solve but for me has proved to be pretty tricky. I would like to return the NEXTVAL of a sequence to my field labeled PK3.
I am able to generate nextval of a sequence ("select MySeq.NEXTVAL FROM dual"); as shown in the preparedstatement found below
When user selects form, How do I automatically return the nextval of my sequence (preparedstatement) to an html field labeled PK3?
I have tried every combination of coding, to return nextval to field PK3 except the one that works. I can say this, the preparedstatement does work. It does select nextval for MySeq but I cannot seem to be able to pass the value to the field labeled PK3
Driver DriverRecordset1 = (Driver)Class.forName(MM_conn_CFOB_oracle_DRIVER).newInstance();
Connection ConnRecordset1 = DriverManager.getConnection(MM_conn_CFOB_oracle_STRING,MM_conn_CFOB_oracle_USERNAME,MM_conn_CFOB_oracle_PASSWORD);
PreparedStatement StatementRecordset1 = ConnRecordset1.prepareStatement("select MySeq.NEXTVAL FROM dual");
ResultSet Recordset1 = StatementRecordset1.executeQuery();
int Recordset1_numRows = 0;
<td align="left" class="faxtext">PASS Nextval using JSP <input name="PK3" type="text" id="PK3" Value=<%=need code %>