Skip to Main Content

Calling procedure in jython

JanGLiNov 18 2016 — edited Nov 21 2016

Hi,

I want to call sql procedure in my befimort jython script.


This is my procedure:

CREATE OR REPLACE PROCEDURE HYPERION_FDMEE.qqq

IS

BEGIN

  UPDATE aif_open_interface SET batch_name = 'xxxx'  WHERE period = 'MAY';

  commit;

END;

and this is my jython befimport script

import java.sql as sql

import com.hyperion.aif.scripting.API as API

fdmAPI = API()

conn = sql.DriverManager.getConnection("jdbc:oracle:thin:@ip:1521:sid", "username", "pass");

cursor = conn.cursor()

cursor.callproc('qqq')

conn.close()

I can't get this script correct.

Should i import other libraries?

Kindly guide i am totally new at this

Regards

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Dec 19 2016
Added on Nov 18 2016
1 comment
152 views