Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Cancel() In JDBC CallableStatement
Driver Version: Oracle 8 Thin
Database: 8.0.4 NT and 7.3.4 NT
In a seperate thread, I am running a "listener"
through a connection by executing
DBMS_PIPE.RECEIVE_MESSAGE as follows:
while (cont) {
[CallableStatement]cs = sqlConn.prepareCall("BEGIN
?:= DBMS_PIPE.RECEIVE_MESSAGE(?); END;");
cs.registerOutParameter(1,
java.sql.Types.INTEGER, 0);
cs.setString(2, pipeName);
termOut("Listening on Pipe " + pipeName +
"....");
cs.execute();
int exitCode = cs.getInt(1);
The code is in an infinite loop so it keeps
listening for messages and it works fine, except
when I try to stop the statement as follows:
cont = false;
cs.cancel();
cs.close();
The cancel() statement executes immediately, but it does not really work because:
How do I cancel the callable statement ?
Thanks !
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Jan 05 1999 - 13:19:55 CST
![]() |
![]() |