XMLPort

atarisataris Member Posts: 109
I created a simple XMLPort to export data from the Customer table. I'm receiving a Microsoft error when I try and call the XMLPort. The error is the standard Microsoft message "Would you like to report this to Microsoft, Send, Don't Send" and then kicks me out of Navision. My code is as follows:

IF EXISTS('c:\xml_customer.xml') THEN
ERASE('c:\xml_customer.xml');

TestFile.CREATE('c:\xml_customer.xml');
TestFile.CREATEOUTSTREAM(TestStream);
XMLPORT.EXPORT(90000,TestStream);
TestFile.CLOSE;
MESSAGE('XML Customer Export Complete.');

It's errors on the CREATEOUTSTREAM function when I debug it. I thought possible it could be my version of XML port but chnaging the versions and encoding doesn't make a difference.

Anyone had this problem before?

Comments

  • ara3nara3n Member Posts: 9,257
    I ran your code in SP1 version it works fine. No crashing. I used a diff xml port

    XMLPORT.EXPORT(8002,TestStream)
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • atarisataris Member Posts: 109
    Mine is still crashing and I'm using SP1.

    What are your properties for the XML set at?

    Mine are Format/Evaluate - XML Format/Evaluate
    Encoding - UTF-16
    XML Version - 1.0

    I'm on XP. Not to sure whats happenning now that you have it working.
  • atarisataris Member Posts: 109
    I have solved this.

    I think the reason why this never worked is because I had never installed Navision on my computer from the cd but rather dragged the files across. So it must need a file in order for it to stream the data.

    Once I re-installed it from the cd it worked ok. \:D/
  • marina_eemarina_ee Member Posts: 30
    I have exactly same problem too, it worked in my development server, but the user cannot run this XMLPort after import to their environment.

    The user's copy of Navision is confirmed installed from CD, not copied from some other places. So reinstall probably does not help.

    Anybody has any other suggestion?
Sign In or Register to comment.