troubleshooting Question

VB.NET - Error on datatable.readxml (unable to read integer fields with NULL value)

Avatar of Wil999
Wil999Flag for Netherlands asked on
Visual Basic.NET
4 Comments1 Solution207 ViewsLast Modified:

I am trying to load a XML file into a datatable with the datatable.readxml method, but i am getting an error because some integer fields have no value in the XML File.

Before reading the XML, i have set the column datatype to integer, and also set the column to allow dbnull. (dtColumn.AllowDBNull = True) I also tried to set the defaultvalue of the column to dbnull.value, but i still got the error.

Does anybody have a solution for this problem?

Karrtik Iyer
Software Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros