Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C blocking call
Assuming your platform is UNIX/ ( POSIX?):
see man pages for system calls
alarm()
signal()
setjmp()
longjmp()
Essentially you set a 30 second alarm before your SQL statement. If the alarm goes off before the statement is finished, your process will get the SIGALRM signal, which you must handle via signal() correctly.
Now, this stuff works great for a blocking read against, say, a device/port, but I'm not exactly sure how it will work ( if at all ) with the PRO/C API. I'm sure it will indeed allow a different part of your code to take control, but doubt it will actually cancel the operation in the backend database.
Good luck,
-Kevin
"Jeroen" <jeroenthuis_at_gmx.net> wrote in message
news:99qeb9$2thf$1_at_buty.wanadoo.nl...
> Question,
>
> I want to develop a Pro*c program, in which i execute a SQL statement. If
> this statements executes more than 30 seconds, i want it to be cancelled.
It
> MUST be singlethreaded code. Is their anyway i can do this using Pro*c,
not
> using a stored procedure ?
>
>
> Jeroen
>
>
Received on Tue Mar 27 2001 - 13:03:13 CST
![]() |
![]() |