web stats
Oracle stored procedure call does not work - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-10-2018, 02:44 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 Oracle stored procedure call does not work

I am trying to fetch value from oracle database. it always give me an error . some body will guide me on right . Is that some thing related to out parameter ,if yes how we can handle it . Even i tried diffrent link in mirth forum like ..
--https://www.mirthcorp.com/community/forums/showthread.php?t=1677
--http://www.mirthproject.org/community/forums/showthread.php?t=4075

---------------------------------------------------------------------------------
var result=0;
var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('oracle.jdbc.driver.OracleDriver','jdbcracle:th in:@192.168.0.226:1521:dbdb25','Dbname','XXX');
var sql = 'exec MIRTH_TEST_PROCEDURE';
var str = '';

try {
objresult = dbConn.executeCachedQuery(sql);
while (objresult.next())
{
str = objresult.getString('Channename');
}
}

catch (e) {
logger.info('call to db failed: ' + e);
}
---------------------------------------------------------------------------------


My oracle stored procedure ---


create or replace PROCEDURE MIRTH_TEST_PROCEDURE (
--p_MODE in number,
P_CURSOR OUT SYS_REFCURSOR)

AS
BEGIN
OPEN p_CURSOR FOR
select * from HL7_CLIENT_CHANNEL;

END;

-------------- Error ---------------------------------------------
[2018-08-10 12:06:54,020] INFO (js-connector:?): call to db failed: JavaException: java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement
Reply With Quote
 

Tags
database error, oracle, stored procedure

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 02:18 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation