Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Ora - 1008 - Not all variables bound error
Dear DBA Gurus,
I am getting the above error while running the below JDBC program. Can anyone help me in solving the problem?
TIA and Regards,
Ranganath
import java.sql.*;
import java.io.*;
public class Alert
{
public static void main(String args[]){
int status = 1; int timeout = 5; String message = new String(); try { String username="SCOTT"; String password="TIGER"; Class.forName("oracle.jdbc.driver.OracleDriver"); String dburl = "jdbc:oracle:oci8:@orcl1"; Connection dbcon =DriverManager.getConnection(dburl,username,password);
CallableStatement cstmt1 = dbcon.prepareCall("begin sys.dbms_alert.register('I_GOT_IT'); end;"); cstmt1.execute(); System.out.println("We are waiting for waitonesignal");
CallableStatement cstmt2 = dbcon.prepareCall("begin sys.dbms_alert.waitany('I_GOT_IT',:message,:status,5); end;"); cstmt2.execute(); if (status == 0) { System.out.println("We have received the signal"); System.out.println("The message that has been received is " + message); System.out.println("Status and time are " + status + timeout); } else System.out.println("No message has been received. EXit Session"); CallableStatement cstmt3 = dbcon.prepareCall("begin sys.dbms_alert.remove('I_GOT_IT'); end;"); cstmt3.execute(); dbcon.close();
}
catch(SQLException nExp) { System.out.println("Connection Failed, SQLException = " + nExp.toString());
}
catch(Exception e) { System.out.println("Connection Failed, Exception = " + e.toString());
}
}
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Ranganath K INET: ranganathk_at_subexgroup.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Jun 08 2001 - 07:35:42 CDT
![]() |
![]() |