Bug Report T190200
Visible to All Users

The "Invalid stream format" exception when the LoadFromStrings method loads data that includes one or more blanks in the last column

created 10 years ago (modified 10 years ago)

Hello,

I can't load data via MemData.LoadFromTextFile - is says "Invalid stream format". There is no problem in 14.1.6 (and older versions).

Since I don't see any info in breaking changes I'd like to know what's wrong.

Vladimír

Comments (2)
DevExpress Support Team 10 years ago

    Thank you for your report. I have reproduced the described behavior and forwarded this ticket to our developers for research.

      The error occurs if the last column is empty. Then the procedure which is analysing line content does not add the last field data value, because S is already empty and while condition is not satisfied.
         while (S <> '') and (ADelimiterPos > 0) do
      After that the test
       if AFields.Count = AValues.Count then
      fails. As the data is already empty in the last column there is no reason to set it in the field.
      As a temporary solution the test line in procedure ParseString (dxmdaset.pas) can be changed to
       if AFields.Count >= AValues.Count then

      Answers approved by DevExpress Support

      created 10 years ago (modified 10 years ago)

      We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

      Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

        Show previous comments (10)

          I will test Mediacom's solution. It appears to work.

            Hello,
            I installed 14.2.5 and I still get LoadFromTextFile : "Invalid stream format". (I use SaveToTextFile to save the file).

            DevExpress Support Team 10 years ago

              Hello Zsolt,

              To process your recent post more efficiently, I created a separate ticket on your behalf: The "Invalid stream format" exception when using the LoadFromStrings method. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.