P
Peter Davies
Hi all; here's hoping you've got better eyes than me.
Code:
String sql = "select duration, dialed_number, st from " +
"(select duration, dialed_number, to_char(start_time, " +
"'YYYY-MM-DD HH24:MI:SS AM') st, row_number() over " +
"(order by start_time desc) r from billing_record where " +
"subscriber_id = ?) where r between 1 and ?";
PreparedStatement vStatement = vConn.prepareStatement(sql);
vStatement.setInt(1, subscriberid);
vStatement.setInt(2, numCalls);
ResultSet rs = vStatement.executeQuery(sql);
Error:
java.sql.SQLException: ORA-01008: not all variables bound
I'm damn sure that I've only got two variables in the SQL statement, and
that I'm setting both of them. What's going on here?
Code:
String sql = "select duration, dialed_number, st from " +
"(select duration, dialed_number, to_char(start_time, " +
"'YYYY-MM-DD HH24:MI:SS AM') st, row_number() over " +
"(order by start_time desc) r from billing_record where " +
"subscriber_id = ?) where r between 1 and ?";
PreparedStatement vStatement = vConn.prepareStatement(sql);
vStatement.setInt(1, subscriberid);
vStatement.setInt(2, numCalls);
ResultSet rs = vStatement.executeQuery(sql);
Error:
java.sql.SQLException: ORA-01008: not all variables bound
I'm damn sure that I've only got two variables in the SQL statement, and
that I'm setting both of them. What's going on here?