Error on exporting XML file

vyankuvyanku Member Posts: 791
I write the following code in codeunit to export the xml file
But when I am trying to run the codeunit Shows me error
"Microsoft business solution-navision has encountered a problem and need to close."
And it will restart the navision.
What was the problem? ](*,)
Please suggest...


Veriables are
ifile file
ostream OutStream
ifile.CREATE('C:\myxml.xml');
ifile.CREATEOUTSTREAM(ostream);
XMLPORT.EXPORT(50000,ostream);
ifile.CLOSE;
MESSAGE('export complited');

Comments

  • kinekine Member Posts: 12,562
    Which OS you are using?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • vyankuvyanku Member Posts: 791
    I am using WIN XP SP2.
    NAV 4.0 SP3
  • ara3nara3n Member Posts: 9,256
    There is something wrong with your xmlport. I suggest o create a simple xmlport and export it, and add new elements one by one and export it.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • vyankuvyanku Member Posts: 791
    I check the same on another PC its working fine.
    But it gives problem on my machine.
  • garakgarak Member Posts: 3,263
    I check the same on another PC its working fine.
    But it gives problem on my machine.

    You have enough permission to store a file under C:\.
    Can u store there manually (like with notepad) a file?

    Regards
    Do you make it right, it works too!
  • ta5ta5 Member Posts: 1,164
    I had a similar problem but it only worked then on Nav 5.x, Nav 3.7 and 4.x crashed.
    (For the purpose (it was a proof of concept) it was ok to just use another Client Version.)

    Regards
    Thomas
Sign In or Register to comment.