Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Failed to write to database (http://www.mirthcorp.com/community/forums/showthread.php?t=214909)

psanders 10-28-2015 06:16 PM

Failed to write to database
 
1 Attachment(s)
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?

mcalKno 10-29-2015 04:26 AM

Date format issue?


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

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