Using readxml when integer column is blank

dazlerd

Well-known member
Joined
Sep 29, 2006
Messages
52
Programming Experience
5-10
Hi

I'm calling a php page on a server that returns an xml string containing the info I need from a MySQL database. The final column retireved is a SmallInt(6) column that has some <null> values in it.

When the XML is returned to my VB.net project the xml looks like:

<numcode></numcode>. Which is valid.

Im using readxml to read this into a dt but it fails saying the input string is in the wrong format.

at system.Number.StringToNumber(String.......

The database is Access 2003 and the column is set up to be Number (Long Integer), required = no and default value = null. I can happily create rows manually in the db with the numcode value left blank.

So how do I get an empty element to go into a integer field as empty?

Thanks

Darren
 
Fail to include it in the xml completely

there's a world of difference between an empty tag and a missing one
 
Back
Top