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

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI timeout?

Re: OCI timeout?

From: Fred Petillot <fpetillo_at_fr.oracle.com>
Date: Wed, 02 Feb 2000 17:19:56 -0100
Message-ID: <3898754C.415A4C5D@fr.oracle.com>


C is a bit rusty, but
something like :

jmp_buf tmo;

void TxTimeOut() { longjmp( tmo, 666 ); }

main() {
[ a lot of initialisation stuff snipped ]

        signal( SIGALRM, TxTimeOut );
        #define SECONDS_BEFORE_TIMEOUT 3
        alarm( SECONDS_BEFORE_TIMEOUT );

if ( setjmp( &tmo ) )
{

    obreak( &lda );
    orol( &lda );
}
 else
{

    oexec( &cda );
}

should do the trick.

vincent wrote:

> How can I manage a query timeout?
> I don't think that there is an OCI call or parameter that manages the
> timeout of a query.
>
> thanks,
> vincent

--

+-------------------------------------+----------------------------+
| Fred Petillot                       |     fpetillo_at_fr.oracle.com |
| Oracle France - Support Technique   |            +33 1 4762 8201 |
| 65, rue des Trois Fontanot          |            +33 6 8089 5135 |
| 92732 Nanterre Cedex                |                            |
+-------------------------------------+----------------------------+



Received on Wed Feb 02 2000 - 12:19:56 CST

Original text of this message

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