Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Pro*C blocking call

Re: Pro*C blocking call

From: Jeroen <jeroenthuis_at_gmx.net>
Date: Tue, 27 Mar 2001 22:11:38 +0200
Message-ID: <99qs1h$shm$1@buty.wanadoo.nl>

Forgot to mention that the program must run on WinNT and Unix...

"Kevin Brand" <kevin.brandx_at_tel.gte.com> wrote in message news:99qo1q$av7$1_at_news.gte.com...
>
> 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 - 14:11:38 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US