web stats
Mirth Community - View Single Post - Oracle stored procedure call does not work
View Single Post
Old 08-14-2018, 06:23 AM
shuhaibk54 shuhaibk54 is offline
OBX.1 Kenobi
Join Date: Jan 2018
Location: Abudhabi
Posts: 26
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);
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:@','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.info("new key=" + newnewKey);


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