<div dir="ltr">Are you actually passing in a FIX string that is separated by pipe characters?  Or did you just show it that way to make your email more readable? The separator has to be an SOH character ("<span style="color:rgb(221,17,68);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:11.818181991577148px;line-height:18px;white-space:pre">\x01</span>"), not a pipe.</div>

<div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><font face="arial, helvetica, sans-serif">--</font></div><font face="arial, helvetica, sans-serif">Mike Gatny<br>Connamara Systems, LLC</font></div></div>

<br><br><div class="gmail_quote">On Fri, Mar 7, 2014 at 3:31 AM, Fredrik S Loekke <span dir="ltr"><<a href="mailto:fsl@lindcapital.com" target="_blank">fsl@lindcapital.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">







<div lang="EN-GB" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hi<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m trying to create QuickFix Messages like this:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="background:white">new QuickFix.Message(@"8=FIX.4.2|35=B|49=TR_Initiator|52=20090101-17:13:06.684|56=TR_Acceptor|148=mounds|33=0", true);<u></u><u></u></span></p>
<p class="MsoNormal"><span style="background:white"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="background:white">But I’m always getting the following error: (with the error happening at various positions)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="background:white"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="background:white">What am I missing?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="background:white"><u></u> <u></u></span></p>
<p class="MsoNormal">QuickFix.MessageParseError was unhandled by user code<u></u><u></u></p>
<p class="MsoNormal">  HResult=-<a href="tel:2146233088" value="+12146233088" target="_blank">2146233088</a><u></u><u></u></p>
<p class="MsoNormal">  Message=Could not parse message: Error at position (2) while parsing msg (8=FIX.4.2|35=B|49=TR_Initiator|52=20090101-17:13:06.684|56=TR_Acceptor|148=mounds|33=0)<u></u><u></u></p>
<p class="MsoNormal">  Source=QuickFix<u></u><u></u></p>
<p class="MsoNormal">  StackTrace:<u></u><u></u></p>
<p class="MsoNormal">       at QuickFix.Message.ExtractField(String msgstr, Int32& pos, DataDictionary sessionDD, DataDictionary appDD)<u></u><u></u></p>
<p class="MsoNormal">       at QuickFix.Message.ExtractField(String msgstr, Int32& pos)<u></u><u></u></p>
<p class="MsoNormal">       at QuickFix.Message.FromStringHeader(String msgstr)<u></u><u></u></p>
<p class="MsoNormal">       at QuickFix.Message..ctor(String msgstr, DataDictionary sessionDataDictionary, DataDictionary appDD, Boolean validate)<u></u><u></u></p>
<p class="MsoNormal">       at QuickFix.Message..ctor(String msgstr, Boolean validate)<u></u><u></u></p>
<p class="MsoNormal">       at BondsTrading.Tests.FixProcessor.Messages.MessageConverterTest.SellSideTcrOnSubmissionMessage() in c:\Users\fsl\source\BondsTrading\trunk\Implementation\BondsTrading\BondsTrading.Tests\FixProcessor\Messages\MessageConverterTest.cs:line
 37<u></u><u></u></p>
<p class="MsoNormal">       at BondsTrading.Tests.FixProcessor.Messages.MessageConverterTest.ShouldNeverReturnNull() in c:\Users\fsl\source\BondsTrading\trunk\Implementation\BondsTrading\BondsTrading.Tests\FixProcessor\Messages\MessageConverterTest.cs:line
 16<u></u><u></u></p>
<p class="MsoNormal">  InnerException: System.ArgumentOutOfRangeException<u></u><u></u></p>
<p class="MsoNormal">       HResult=-<a href="tel:2146233086" value="+12146233086" target="_blank">2146233086</a><u></u><u></u></p>
<p class="MsoNormal">       Message=Length cannot be less than zero.<u></u><u></u></p>
<p class="MsoNormal">Parameter name: length<u></u><u></u></p>
<p class="MsoNormal">       Source=mscorlib<u></u><u></u></p>
<p class="MsoNormal">       ParamName=length<u></u><u></u></p>
<p class="MsoNormal">       StackTrace:<u></u><u></u></p>
<p class="MsoNormal">            at System.String.Substring(Int32 startIndex, Int32 length)<u></u><u></u></p>
<p class="MsoNormal">            at QuickFix.Message.ExtractField(String msgstr, Int32& pos, DataDictionary sessionDD, DataDictionary appDD)<u></u><u></u></p>
<p class="MsoNormal">       InnerException:<span style="background:white"><u></u><u></u></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="background:white;font-size:9.5pt;font-family:Consolas"><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="DA" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#0b1d3f">Best regards</span><span lang="DA" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">
</span><span lang="DA" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#0b1d3f">/</span><span lang="DA" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#1f497d">
</span><span lang="DA" style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#0b1d3f">Med venlig hilsen</span><span lang="DA" style="font-family:"Arial","sans-serif";color:#181818"><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="DA" style="font-size:12.0pt;font-family:"Arial","sans-serif";color:#0a0e15"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="DA" style="font-size:12.0pt;font-family:"Eras Demi ITC";color:#0b1d3f">Fredrik Skeel Løkke</span></b><span lang="DA" style="font-size:12.0pt;font-family:"Eras Demi ITC";color:#0b1d3f"><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#0b1d3f">Software Developer
</span><span lang="EN-US" style="font-family:"Arial","sans-serif";color:#0b1d3f">ǀ</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#0b1d3f"> IT & Analysis
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#1f497d"> </span><u><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#181818">
</span></u><span lang="EN-US" style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#181818"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#181818">Mob.: <a href="tel:%2B45%203176%208438" value="+4531768438" target="_blank">+45 3176 8438</a><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#1982d1"><a href="mailto:fsl@lindcapital.com" target="_blank"><span style="color:#1982d1">fsl@lindcapital.com</span></a><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;color:#2d95eb"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:#222222"><img border="0" width="193" height="50" src="cid:image001.png@01CF39F0.662D1AC0" alt="Beskrivelse: Beskrivelse: Beskrivelse: Beskrivelse: cid:image001.png@01CD4A0C.218B6960"></span><span lang="DA" style="color:#222222"><u></u><u></u></span></p>


<p class="MsoNormal"><span lang="DA" style="font-family:"Arial","sans-serif";color:#181818"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#181818">Lind Capital A/S<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#181818">Værkmestergade 3, 2<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="DA" style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#181818">DK-8000 Aarhus C<u></u><u></u></span></p>
<p class="MsoNormal" style="line-height:130%"><span lang="DA" style="font-family:"Arial","sans-serif";color:#1f497d"><a href="http://www.lindcapital.com/" target="_blank"><span style="font-size:9.0pt;line-height:130%;color:#1982d1">www.lindcapital.com</span></a><u></u><u></u></span></p>


<p class="MsoNormal" style="line-height:115%"><span lang="DA" style="font-size:9.0pt;line-height:115%;font-family:"Arial","sans-serif";color:#181818">Follow us on</span><span lang="DA" style="color:#181818"><u></u><u></u></span></p>


<p class="MsoNormal" style="line-height:115%"><span lang="DA" style="color:#181818">­</span><a href="http://www.linkedin.com/company/lind-capital-a-s" target="_blank"><span style="color:blue;text-decoration:none"><img border="0" width="26" height="26" src="cid:image002.png@01CF39F0.662D1AC0" alt="linkedin"></span></a><span lang="DA" style="color:#181818"> 
</span><a href="http://www.facebook.com/LindCapital" target="_blank"><span style="color:blue;text-decoration:none"><img border="0" width="26" height="26" src="cid:image003.png@01CF39F0.662D1AC0" alt="facebook"></span></a><span lang="DA" style="color:#181818"><u></u><u></u></span></p>


<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

<br>_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
<br></blockquote></div><br></div>