Skip to Content
author's profile photo Former Member
Former Member

PB 12.5.2 Classic - Exporting to XML export zero instead of null

Okay, I have found an answer, somewhat to this one, but wanted to put it here in case someone else finds it useful or has any further information.

We are using Powerbuilder 12.5.2 Build 5583 Classic and we are exporting a datawindow to XML using this code:

ads.Object.DataWindow.Export.XML.MetaDataType = XMLSchema!

ads.Object.DataWindow.Export.XML.SaveMetaData = MetaDataExternal!

ls_validation_xml = ads.Object.DataWindow.Data.XML

Now one of the columns in ads is a long, and is set to null. However after the export the value in the XML is set to zero. The datawindow is a web services datawindow and that particular column has nillable="True", not sure if any of that matters but it may.

The way to fix this, and it sounds stupid to me, but I really tested it and it is true, is to add the column to the detail band, possibly any band, if it wasn't already there.

Basically if you have a datastore like I did that is never viewed by the user and therefore has no controls on it at all the export doesn't quite work properly! It seems strange to me, but if anyone has any explanations as to why this is so, and / or feels there is a good reason for it to act this way, please let me know so I can understand and document it.

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 17, 2015 at 04:56 PM

    Hi Aron;

    Wow .. that sounds like a "bug" to me. I wonder if you could reproduce this in PB 12.6?

    Regards ... Chris

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.