JDBC Keep Query open for checking
I am now just getting into the JDBC api quite in depth.
I want to be able to see when a new row is inserted into the a table.
My method so far was "simple". I used "INSENSITIVE" ResultSets since I
understand "Sensitive" ResultSets are cached to the computer (I want my
ResultSet to be OPEN on the server to check it, and then sleep). To
prevent TONS of overhead I do NOT want to issue the query again (even
though this is a simple solution). I realized I could likely make a
stored query, but if I can do it directly in the result set that would
I simply keep going through the resulset(".next()") until I get to a
"Zero" row, storing the one JUST previous as the final row.
Connection con =
Statement stmt =
I have tried OODLES of "workarounds" -- and have searched these forums
for prolly atleast 2 hrs. It sounds like there is a way to use "FOR
UPDATE" in the Query to get a lock, but then I need to make another
query to commit...is this more useful?
btw, the driver is: "com.ibm.as400.access.AS400JDBCDriver"
Would this work, if I could get "COM.ibm.db2.jdbc.app.DB2Driver" driver
Thank you so much to ANYONE for helping in any way they can, my mind is
rattled by this one.
Re: JDBC Keep Query open for checking
Somehow the last number decrements when another program issues the
delete (As400 Client program provided by IBM), BUT I cannot see the
last number INCREMENT when a row is inserted...I think I have tried
every transaction isolation level too.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Re: JDBC call vs. ODBC||David L Cassell||Newsgroup comp.soft-sys.sas||1||11-15-2006 02:14 PM|
|Data Programming question||VV||Newsgroup comp.soft-sys.sas||0||11-14-2006 10:26 PM|
|Re: My query involves Cartesian product||Sigurd Hermansen||Newsgroup comp.soft-sys.sas||0||06-23-2006 09:17 PM|
|appdev studio error........ Can I give a CREATE TABLE AS query||m k||Newsgroup comp.soft-sys.sas||0||02-10-2005 04:26 PM|