Oracle OTD - error when changing prepared statement

I have some oracle otds which were originally created under ican 5.0.5.

These are prepared statements with placeholders

(e.g. update tableX set a = ? where b = ?)

where i provide the variables in my jcd code.

These work at runtime now that I have upgraded to jcaps 5.1.1. However if I try and edit the prepared statement e.g to change to

update tableX set a = ?, c=? where b = ?, for example,

I get the following error -

"[Seebeyond][Oracle JDBC Driver] The requested parameter metadata is not available for the current statement."

It seems to be something to do with the placeholders.

Any ideas on what is causing this?

[684 byte] By [marto10] at [2007-11-26 11:38:21]
# 1
Could you please provide your complete piece of code ?
guido@be at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 2

Sorry lost my account so unable to respond for a while.

In answer to your response - "please provide complete piece of code" -

there isn't really any code other than what's defined in the oracle otd prepared statement wizard.

Basically in JCAPS 5.1.1 I find if I create a new Oracle OTD, then go through the wizard and choose 'Prepared Statements'. I then try add a prepared statement called test with the following sql statement 'update mytable set myval = x where myid = ?'. On choosing OK i get the error message - "[Seebeyond][Oracle JDBC Driver] The requested parameter metadata is not available for the current statement."

I'm wondering whether this is a classpath or Oracle client issue. Any ideas?

marto11 at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 3
Wrong syntax in the prepared statement :update tableX set a = ?, c=? where b = ?should be update tableX set (a,c)=(?,?) where b = ?
guido@be at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 4

thanks for the response but i don't think that's it.

The statement builder in the wizard creates the statements as -

update table X set a = ?, c=? where b=? - which is correct as is the example you gave.

The issue seems to be if I try and edit the statement once created -

e.g. change it to something like -

update tableX set attempt = attempt + 1 where b = ?

or update tableX set create_date = sysdate where b = ?

These both fail with the error - ""Seebeyond][Oracle JDBC Driver] The requested parameter metadata is not available for the current statement" - even though I think the sql is valid.

marto11 at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 5

Hi,

We too used to get the same problem,when we change the oracle otd and save, it should update in the jcd also but it doesnt.So what we can do is just right click on the JCD->Properties where we can see the input otd,output otd and oracle otd list,Just remove the oracle otd and add again or double click the existing otd,So the JCD will get updated automatically.

I believe this solve your problem.

Thanks,

Renga.S.

RengaScreen at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 6

Hi,

I don't think that's it - I think that's probably a different problem.

I get this error even when I create a new Oracle OTD for a prepared statement, which isn't yet used by any jcds.

Can anyone confirm on jcaps 5.1 they can create a new oracle otd with a prepared statement with the following sql -

update tableX set create_date = sysdate where b = ?

Note the following works ok -

update tableX set create_date = ? where b = ?

..but plugging a value in such a sysdate doesn't on my installation.

marto11 at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 7
This appears to be a JCAPS 5.1.1 issue. Just surprised no one else is seeing it. Can anyone confirm?I don't have the same problem changing prepared statements under ICAN 5.0.5.
marto11 at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 8
n the problem persists in 5.1.2 too...At the moment, I am using dynamic prepared statement using the OTD connection. Pls let me know once the work-around is available.
AlanWake at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 9
sorry for the typo...this problem is solved with JCAPS 5.1.2. Looks like the driver problem in 510
AlanWake at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 10
thanks.
marto11 at 2007-7-7 11:37:58 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...