Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Importing a file without delimiters

(0) ShareShare
ReportReport
Posted on by 297

Hi 

I am trying to import a file without delimiters and its a transaction file with one long string having divided by 120 characters. I could not handle it through code as AX supports only string size of 65000 characters.  I have used the commaio class but it does not read all the data and randomly reads only a portion of data.

Any help is appreciated.

Thanks

*This post is locked for comments

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Importing a file without delimiters

    So you can read file to a string now.

    Use https://msdn.microsoft.com/en-us/library/aa677836.aspx in a loop to split it.

  • SKO Profile Picture
    SKO 297 on at
    RE: Importing a file without delimiters

    Hi Ievgen,

    Amazing!!!! It works.

    But i have more requirement like my import file is of type simple text file and it has transactions in it. All the transactions are loaded without any delimiters and i have to read the transactions by breaking them to 120 characters each.

    Can you please help me

  • Verified answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: Importing a file without delimiters

    Hi Srikanth,

    You can try to use System.IO.StreamReader mycsharpdeveloper.wordpress.com/.../how-to-read-text-file-line-by-line-in-ax

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans