permaculture playing cards*
The moose likes JDBC and the fly likes using :new in oracle JDBC Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "using :new in oracle JDBC Query" Watch "using :new in oracle JDBC Query" New topic
Author

using :new in oracle JDBC Query

Kedar Bhawarthi
Greenhorn

Joined: May 14, 2004
Posts: 8
Hello,
I calling a Java procedure from within oracle trigger.
But in that procedure I am not being able to get access of :new variable in query fired by JDBC.
I get error as
oracle.jdbc.driver.OracleSQLException: ORA-01008: not all variables bound

Please help me to fix this.


My Trigger is written like this


...where FRAUD_SCORE_TBL_ROW_ADDED procedure maps to a java procedure 'rowAdded'


I am trying to execute a code in rowAdded as...


My understanding is, if some code, executing under trigger (may be written in java, or PL/SQL) should have access to this :new variable.
Please correct me if I amk wrong.
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1121

Bhawarthi,
Any stored procedure (either java or PL/SQL or C) does not have access to :new or ld. You can only access these in the trigger code, not in the code of the procedure that is called by the trigger code.

Good Luck,
Avi.
Kedar Bhawarthi
Greenhorn

Joined: May 14, 2004
Posts: 8
thanks Avi, I am convinced to this fact now and adopted a workaround (a constrained one), thanks for your reply.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using :new in oracle JDBC Query
 
Similar Threads
Calling Stored proc using Hibernate @NamedNativeQuery
Gettting multiple Rows from stored proc
Update D/b with Java variable
Error :java.sql.SQLException: Invalid column index
Export from Oracle to Lotus Notes Domino