Announcement

Collapse
No announcement yet.

Failed to write to database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 IGNORE 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

  • #2
    Date format issue?

    Comment

    Working...
    X