web stats
Calling stored procedures of mysql in Javascript - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-17-2015, 01:55 AM
vibinChander vibinChander is offline
OBX.2 Kenobi
 
Join Date: Jul 2015
Location: Chennai
Posts: 74
vibinChander is on a distinguished road
Send a message via Skype™ to vibinChander
Default Calling stored procedures of mysql in Javascript

Hi guys,
I like to insert data into multiple tables through mirth instead of going for multiple insert statements what I thought is it would be better to write a store procedure in Mysql and call it from mirth.

Code:
var dbconn=DatabaseConnectionFactory.createDatabaseConnection("com.mysql.jdbc.Driver","jdbc:mysql://localhost:3306/Dummy");
This is the connection code. And I inserted 4 insert statements into 4 different tables after this, Now, to check whether the store procedure works I wrote a simple store procedure in mysql in phpmyadmin as follows:

Code:
BEGIN
select * from patient_demographics;
END
I tried to call this stored procedure using
Code:
call patient_demographics();
Im writing this in source transformer and mirth is throwing error saying something wrong or something is missing.
Could you guys help me?
Reply With Quote
  #2  
Old 08-17-2015, 07:59 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,123
narupley is on a distinguished road
Default

What's the actual code (minus connection info) and error stacktrace?
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
Reply

Tags
mirth 3.0, mysql

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 09:42 AM.


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