Question Pardha Mutyala · Mar 14, 2018

I am using SQL Outbound adapter and inserting a HL 7 Message by executing a stored procedure and getting an error 

ERROR #6022: Gateway failed: Execute.
+
ERROR <Ens>ErrGeneral: SQLState: (22001) NativeError: [0] Message: [Microsoft][ODBC SQL Server Driver]String data, right truncation

The reason i found is that segment delimiter is causing an issue and following is sample code 

Method AddMessage(pRequest As EnsLib.HL7.Message, Output pResponse As Ens.Response) As %Status
{
    Set tQuery="{call dbo.HL7Message_Insert(?,?,?) }"
    Set params = 3
    
    
      set params(1)= "XYZ"
     set

9
0 938