Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: tracking changes on a table through ODBC application
"Anton Buijs" <remove_aammbuijs_at_xs4all.nl> wrote in message
news:3f17080a$0$49099$e4fe514c_at_news.xs4all.nl...
> db dude <db_guy_2002_at_yahoo.com> schreef in berichtnieuws
> f4a8da28.0307161718.395202f7_at_posting.google.com...
> | I have a table in which users are inserting records almost all the
> | time. I need to write an ODBC based application program that would
> | allow me to see what data is being inserted into the table in real
> | time.
> |
> | One idea is to run a select query on the table (select * from table)
> | once, keep the resultset open throughout the lifetime of the
> | application, and then do SQLFetch() to get each new row that has been
> | inserted into the table.
> |
> | My question is weather it is possible to keep the resultset open and
> | see changes from other users in that result set. Can this be done
> | using a cursor?
> |
> | Thanks
>
> Just an idea, don't know if it can work because I have never worked with
> pipes, just know of the existence.
> A trigger on the table could write to a pipe (see dbms_pipe package
> description in the "Supplied PL/SQL Packages Reference). Your program just
> reads the pipe.
> I think you can make it sit and wait till a message arrives in the pipe.
> That is what you want don't you?
> Be aware of the fact that any other program can read the same pipe at the
> same time. Once a program has read it, it's gone.
> Pipes are "independent on transactions", that means when the trigger
writes
> the pipe and the transaction is rolled back, the pipe message is not
> removed. You suggest that you want this.
>
>
Anton,
Not a good idea to suggest this. Pipes use memory in shared area. If he does
not read from the pipe very often, he
might as well put a stick/pipe up the databases a$$.
Pipes should not be misused like this IMHO.
Anurag Received on Fri Jul 18 2003 - 10:39:55 CDT
![]() |
![]() |