on 03-17-2006 2:19 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.