web stats
Failed to write to database - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-28-2015, 06:16 PM
psanders psanders is offline
OBX.2 Kenobi
 
Join Date: Nov 2011
Posts: 55
psanders is on a distinguished road
Default Failed to write to database

Hi all,

I'm inserting an HL7 message into a SQL Server 11 table with the following columns and datatypes

MSG_ID INT
MSH10_ID varchar(50)
MESSAGE varchar(max)
INSERT_DT datetime

My SQL looks like this:

INSERT INTO QUEUE_HL7 (MSG_ID, MSH10_ID, MESSAGE, INSERT_DT)
VALUES (${message.messageId},${MSH10},${message.rawData}, ${DATE})

However, when I deploy the channel and start it, I get this error:

Database Writer error
ERROR MESSAGE: Failed to write to database
com.mirth.connect.connectors.jdbc.DatabaseDispatch erException: Failed to write to database
further in the log is this statement:
Caused by: java.sql.SQLException: Invalid parameter index 5.

I'm guessing that the parameter it doesn't like is the date variable, but could use some suggestions on this. Any thoughts?
Attached Files
File Type: xml TestChannelv2.xml (24.2 KB, 25 views)
Reply With Quote
  #2  
Old 10-29-2015, 04:26 AM
mcalKno mcalKno is offline
 
Join Date: Apr 2015
Location: Pennsylvania
Posts: 247
mcalKno is on a distinguished road
Default

Date format issue?
Reply With Quote
Reply

Tags
insert, sql server

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:44 AM.


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