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?
0
Comments
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
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.
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/
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?