web stats
Mirth Community - View Single Post - Oracle stored procedure call does not work
View Single Post
  #3  
Old 08-14-2018, 05:23 AM
shuhaibk54 shuhaibk54 is offline
Mirth Newb
 
Join Date: Jan 2018
Location: Abudhabi
Posts: 23
shuhaibk54 is on a distinguished road
Send a message via AIM to shuhaibk54 Send a message via Skype™ to shuhaibk54
Default ORA-00900: invalid SQL statement and tried different way

I am getting same error even if edit the script .

[2018-08-14 18:44:45,050] INFO (js-connector:?): call to db failed: JavaException: java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement

and I tried different way . it returns false no error
--------------------------------------------------------
importPackage(Packages.ca.uhn.hl7v2.model.primitiv e);
importPackage(Packages.oracle.jdbc.driver);
importPackage(java.sql);
java.sql.DriverManager.registerDriver (new OracleDriver());

// Change connection info here !!!
// jdbcracle:thin:@<host>/<service_name>
// jdbcracle:thin:@<host>:<sid>
var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('oracle.jdbc.driver.OracleDriver','jdbcracle:th in:@192.168.0.226:1521:XXX','CCCCC','XXX');
conn = dbConn.getConnection();
//var spstmt = dbConn.prepareCall("{ call store_adt_event(?, ?, ?, ?, ?, ?, ?, ?) }");
var spstmt = conn.prepareCall("{ call MIRTH_TEST_PROCEDURE(?) }");

spstmt.registerOutParameter(1, OracleTypes.CURSOR);
logger.debug(spstmt.execute()); /// it returns false.

//var result=spstmt.executeQuery();

//var result = spstmt.getResultSet();//getInt("pr_key");
//logger.debug("size=="+result.size());

//logger.info("new key=" + newnewKey);


dbConn.close();
----------------------------------------------------------

Last edited by shuhaibk54; 08-14-2018 at 05:58 AM.
Reply With Quote