Skip to main content

Notifications

Microsoft Dynamics AX forum
Answered

CommaTextIO is not initalized - AX 2009

Posted on by 80

Hi All,

I have a custom code written to read CSV file and I am getting "CommaTextIO is not initalized " error. This code is written in AX 2009. Kernel and Application Version : 5.0.1500.6491

Localization version -Eastern Europe

Below is the code snippet.

FileName path = @"\\Test\Test.csv";

permission = new fileIOpermission(path,#io_read);
permission.assert();

textIO = new CommaTextIo(path,#io_read);
textIO.inFieldDelimiter(",");
textIO.inRecordDelimiter('\r\n');

I have verified that I have proper access to path. The class is having property set to Run on Server and is extending Run base batch class. 

Is it necessary that the service account used to run AOS should also have access to this network path ?

Any help will be very great.

Thanks In Advance.

  • Shailee Shah Profile Picture
    Shailee Shah 80 on at
    RE: CommaTextIO is not initalized - AX 2009

    After providing access to AOS service account to that path it worked.

  • Shailee Shah Profile Picture
    Shailee Shah 80 on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi BR, Sergei,

    Let me try adding service account with full access to file and folder and check.

  • Shailee Shah Profile Picture
    Shailee Shah 80 on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi Blue Wang,

    I have gone through the thread but it does not resolved my issue. I do have UNC path and as well as shared folder and tried from both.

    One more thing I would like to add is that If I try to run this from a file which is on my desktop it is working fine.

    Don't know what is missing between network path and desktop path.

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi Shailee,

    If you create TextIO on server side AOS service account should have access to that file or folder.

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: CommaTextIO is not initalized - AX 2009

    Hi Shailee,

    Yes, The recommended approach is to use shared folder and UNC path.

    Please refer this thread:

    community.dynamics.com/.../textio-object-not-initialized

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

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,782 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,067 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,150

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans