web stats
invalid charcater issue - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2014, 12:00 PM
Anirudh Anirudh is offline
OBX.3 Kenobi
 
Join Date: Sep 2012
Posts: 135
Anirudh is on a distinguished road
Default invalid charcater issue

Hi,

I am trying to use a local channel id I got from one query on a different query. Below is the query. I am seeing inavlid character issue. Can someone help me out

if( (days != null && days > 0) || (lastSentDate == null) ) {
var dbConn = DatabaseConnectionFactory.createDatabaseConnection (dbDriver,dburl,dbUname,dbPassword);
var sql = "select LOCAL_CHANNEL_ID from CHANNEL,D_CHANNELS where CHANNEL.ID = D_CHANNELS.CHANNEL_ID and NAME NOT IN ('Error Channel')";
var result = dbConn.executeCachedQuery(sql);
result.beforeFirst();
var localId;
while(result.next()){
localId = result.getString("LOCAL_CHANNEL_ID").trim().toStri ng();
logger.info("local id:"+localId);

}
for(i =0 ;i < localId; i++){
var sql1 = "select * from D_MM${localId}";
var result1 = dbConn.executeCachedQuery(sql1);
while(result1.next()){
var status = result1.getString("STATUS").toString();
logger.info("status is:"+status);
}
}
}
/*
Reply With Quote
  #2  
Old 07-25-2014, 12:00 PM
Anirudh Anirudh is offline
OBX.3 Kenobi
 
Join Date: Sep 2012
Posts: 135
Anirudh is on a distinguished road
Default

This is for mirth 3.x.

I need to check number of messages for each interface
Reply With Quote
  #3  
Old 07-25-2014, 03:52 PM
Anirudh Anirudh is offline
OBX.3 Kenobi
 
Join Date: Sep 2012
Posts: 135
Anirudh is on a distinguished road
Default

Can anyone please guide me..
Reply With Quote
  #4  
Old 07-28-2014, 03:46 AM
StefanScholte StefanScholte is offline
 
Join Date: May 2009
Location: Netherlands, Harderwijk
Posts: 321
StefanScholte is on a distinguished road
Default

Hi There,

Try using the com.mirth.connect.server.userutil.ChannelUtil class provided by Mirth

check the user-api documentation.

There are functions that returns errorcount sendcount etc.
Reply With Quote
Reply

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


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