Re: asynchronous query

From: Jinqlih Sang <csang_at_home.com>
Date: Wed, 03 Jun 1998 14:28:21 GMT
Message-ID: <35755E3E.BBBDB029_at_home.com>


How to do that? I don't get it.

The code in my application is like:

++++++++++++++
EXEC SQL PREPARE ... (prepare sql statement) EXEC SQL DECLARE CURSOR ... (declare a cursor) EXEC SQL OPEN ... (open a cursor)
EXEC SQL DECLARE SELECT LIST FOR sqlCommand INTO SelectDescriptor

                        (describe the returned results)
EXEC SQL FETCH ...USING DESCRIPTOR ... (retrieve the next row) EXEC SQL CLOSE ... (close the cursor)
++++++++++++++
  • I wish I can cancel the select statement when Oracle Server has been executing (the cursor is open already)
  • In another words, I wish Oracle client can pass the sql statement to Oracle server, and Oracle server would (could be??) simply execute it but return the control to the oracle client so the oracle client appliation can still do something else. The client can ask Oracle server whether the data is available to fetch or not. If Oracle server would return "yes, data is ready." then client will start fetching the data.

Does it make sense?

I know SQL Server can do that, I am wondering if Oracle can do that or not. It would be helpful if it's a large select, otherwise the client can not do anything except waiting.

Thanks.

Thomas Kyte wrote:
>
> A copy of this was sent to Jinqlih Sang <csang_at_home.com>
> (if that email address didn't require changing)
> On Tue, 02 Jun 1998 07:20:36 GMT, you wrote:
>
> >Does anyonw know if oracle can handle asynchronous query
> >in dynamic SQL (Pro C)?
>
> You can sort of background things using dbms_jobs but to do a 'real' async query
> you need to use non-blocking OCI. Pro*C can't do non blocking calls (you need a
> more sophisticated API then the EXEC SQL syntax allows for). You can however
> mix OCI and pro*c together to accomplish this (using pro*c for all but the
> non-blocking calls)
>
>
> Thomas Kyte
> tkyte_at_us.oracle.com
> Oracle Government
> Herndon VA
>
> http://govt.us.oracle.com/ -- downloadable utilities
>
> ----------------------------------------------------------------------------
> Opinions are mine and do not necessarily reflect those of Oracle Corporation
>
> Anti-Anti Spam Msg: if you want an answer emailed to you,
> you have to make it easy to get email to you. Any bounced
> email will be treated the same way i treat SPAM-- I delete it.
Received on Wed Jun 03 1998 - 16:28:21 CEST

Original text of this message