Specified cast is not valid in WriteXml using Dataset

This exception appears when using WriteXml of datatable or dataset. This is also caused by when you create a datatable manually and you set the “defaultvalue” to one or more datacolumn. Remove the “defaultvalue” and it will be fine.

For more information on setting defaultvalue click here

, , ,

  1. No comments yet.
(will not be published)
Submit Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Subscribe to comments feed
  1. No trackbacks yet.

SetPageWidth