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

Home -> Community -> Usenet -> c.d.o.tools -> Is it possible to timeout in PRO*C/C++?

Is it possible to timeout in PRO*C/C++?

From: Yun Gao <ygao_at_mindspring.com>
Date: Thu, 3 May 2001 21:28:27 -0400
Message-ID: <9ct00j$jki$1@slb7.atl.mindspring.net>

Hi,

I'm writing an Oracle client app on NT using PRO*C/C++ (oracle 8.0.5/8.1.5) and have the following two questions:

  1. Is it possible to set up timeout in PRO*C/C++, PL/SQL or through local machine oracle(network) initial setting?

=Motivation:

I need to call a third party stored procedure through an Embedding PL/SQL Block like

EXEC SQL EXECUTE
DECLARE
...
BEGIN
  ...
  storedProcedureName(...)
  ...
END;
END-EXEC;
=Problem: sometimes storedProcedureName() takes too much time because of
row/table locking,

    which causes my app stuck.

=Note: I can only do my own timeout through multithreading.

2. Is there a simple way (query) to get the first unlocked row in PRO*C/C++ ?
 <Wished there were a pseudo-column like ROWID to tell if a row is locked -:) >

=Note: The way I can think about is using a read only Cursor and

    'SELECT <specific row>... FOR UPDATE NOWAIT' to test if the row is locked.

Any suggestion is appreciated.

Regards,
Y.G. Received on Thu May 03 2001 - 20:28:27 CDT

Original text of this message

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