cancel
Showing results for 
Search instead for 
Did you mean: 

I can not use prepareCall method

0 Kudos

Hi Experts,

I have a little problem with PrepareCall method.

I try to call a procedure from Oracle server.

but i get an error message:

<i>java.lang.UnsupportedOperationException: Method prepareCall is not supported by Open JDBC</i>

and this is my code:

InitialContext ctx = new InitialContext();
javax.sql.DataSource ds =(javax.sql.DataSource) ctx.lookup("jdbc/<NAME>");
Connection con = ds.getConnection();			
CallableStatement stmt = con.prepareCall("{INSERTTEMSUP_NEWS_ATTACH(?,?,?,?,?,?)}");
stmt.setInt(1,wdContext.currentContextElement().getGfid());
stmt.setInt(2,ID);
stmt.setString(3,"0");
stmt.setString(4,"0");
stmt.setString(5,FM);
stmt.setString(6,FP);
stmt.executeUpdate();
stmt.close();
con.commit();
con.setAutoCommit(true);
con.close();

Can you help me?

Accepted Solutions (1)

Accepted Solutions (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Altug ,

Check one thing in the DataSource u have created in Visual Administrator.

Against the Datasource , in the Additional tab,

select "Vendor SQL" instead of "Open SQL"...

then do one more thing ..

use

CallableStatement call = conn.prepareCall{

"{call INSERTTEMSUP_NEWS_ATTACH(?, ?, ?)}"};

instead of u have written there.....

Regards

Kishor Gopinathan

Answers (0)