Processing XML file and SQL Tables

ChessExpertChessExpert Member Posts: 103
Hello there experts. I would like to ask for some advice on what is the best way to process external XML file and process them in NAV. During processing, I have to delete some NAV records and insert new records as well.

Also, I have to reference some internal MS SQL tables, so that I can validate codes.

My solution:
I was thinking of writing a Desktop Application program in Visual Studio, then use NODBC to access Nav tables.

My second option:
I was also considering writing the code in CSIDE, then use NAS service to execute the CodeUnit.

Thank you for your opinion.

Thank you in advance.


  • Options
    AdrianAkersAdrianAkers Member Posts: 137
    Can you not achieve your solution fully in NAV. Best option as then you don't have to install a custom app to your customer and also debugging of the NAV code will be easier if something goes wrong on-site.

    You can use the Microsoft XML v6.0 DOM as is already used in NAV. Example codeunits are 702 and 403.

    You can access your tables then from within NAV.

    We have a similar solution sending XML documents via web services to different dadtabases. The NAS then picks up and processes the XML documents in the other locations and updates relevant tables.
  • Options
    ChessExpertChessExpert Member Posts: 103
    Thank you Adrian. How did you manage to access MS SQL tables?
  • Options
    kinekine Member Posts: 12,562
    Just search for ADO examples on the forum and on the NAV blogs of different users from this forum. There are good examples how to use the ADO automation to access SQL tables.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    ChessExpertChessExpert Member Posts: 103
    Thank you everyone. Surely helped me a lot. ChessExpert.
Sign In or Register to comment.