web stats
Failed to write to database - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 10-28-2015, 07: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

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

My SQL looks like this:

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
Old 10-29-2015, 05:26 AM
mcalKno mcalKno is offline
Join Date: Apr 2015
Location: Pennsylvania
Posts: 247
mcalKno is on a distinguished road

Date format issue?
Reply With Quote

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

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