I am doing a windows mobile project that uses ASP.NET web services.
Web service returns dataset-s that are pulled from database and later saved
on local mobile storage (write XML). On client (WM 6.1) program loads
dataset (read XML and read XML schema) when needed. User can insert/aappend
new records.
My problem occures when some data fileds are empty... default method
WriteXML, on client side, does not create XML nodes for empty
fields/columns.
Than when you are trying to reference some field value that was empty, you
get exception.
Is there any property or method of DataSet that I could use to save dataset
with all fields/columns regardless if empty or not ?
Reagards,
Milo
I ran into the same problem - the logic behind this all, of course, is to
save lots of space for a sparse table.
You can specify the WriteSchema mode, which will emit the schema as XSD.
If your receiving end can interpret the XSD, Bob's your uncle. If not ...
The only other solution I found was to set null values to a placeholder
value - I used "-" - write out the xml, and do a string replace to convert
the "-" to a null string. This got the job done, but I wasn't happy with
it.
Perhaps someone else has a better way to address this issue.
--
Mike Russell - http://www.curvemeister.com