Show first zero when saving to XML

  • Thread starter Thread starter jez
  • Start date Start date
J

jez

I've created a dataset with one of the fields as type Int32. When I save it
to an XML file (as Int32) the first zero gets removed.
For example : 02085586598 becomes 2085586598 (example of phone number). What
should I do to keep the first zero as well as the Int32 type when saving my
DataSet to an XML file ?

thanks,

jez
 
jez,

If the value is an int, the leading zero is meaningless and just wastes
space in the XML file. If you also create the schema with the XML file is
saved, you have your data types. If you really do need the leading zero,
probably you should be using a string instead of an int for a phone number.
 
Back
Top