Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> pro-c and asynchronous (or cancellable) database calls
Hello.
I have an application whose database layer of the fat client is programmed in C++ and uses the pro-c precompiler to generate SQL code that can be compiled and linked into the application to access the Oracle database (usually 7.3.4, sometimes 8.x) We have some rather hefty queries that may take several minutes to run which I would like the user to be able to cancel out of. Several questions come to mind including: 1 - is pro-c thread safe 2 - is there a way to cancell ongoing queries - if so does this mean that I can do it via a new thread that opens a new connection, or what. I am just trying to figure out what my options are. We do have some code in a few stored procedure packages (and could put more there), so perhaps there is a slick way of doing it with stored procedures? I was thinking maybe between some unique identifier, and a table to register a query that is complex using it, a separate thread could poke in and commit avalue saying that particular query had been cancelled.
I am sure someone has done all this before, and I amjust looking for answers/options..
Thanks Jeff Kish
![]() |
![]() |