Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Development (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=8)
-   -   Share database conn. info. across different destinations? (http://www.mirthcorp.com/community/forums/showthread.php?t=441)

nshaik 09-18-2006 02:16 PM

Share database conn. info. across different destinations?
 
Referred "queryDatabase Filter" example at

http://www.mirthproject.org/index.ph...filter_example

which uses:

var driver = "net.sourceforge.jtds.jdbc.Driver";
var address = "jdbc:jtds:sqlserver://srv.test.com:1433/DevMirth;";
var username = "mirth";
var password = "mirth";

...

Question: How to share the database connection settings across different database destinations on a single channel?

For e.g., Channel called "MirthHL7Test" has

the filter above for two database destinations called

DestForA04 --> uses above filter and inserts new patient record to Patient table.

DestForA08 --> uses similar filter and does an update of patient record on Patient table.

Would like to have the driver, address, username, and password defined in one place to be used across all destinations.

Tried playing around with the global variable but couldn't get it to work. An example would help a lot!

Thanks in advance!

chrisl 09-18-2006 03:10 PM

Re: Share database conn. info. across different destinations?
 
globalMap.put('driver', "net.sourceforge.jtds.jdbc.Driver");

When you want to access it:

globalMap.get('driver');


We have made significant changes to the globalMap in 1.2, however the same syntax should apply.

-Chris


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

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