0
kicks
ADO.NET DataTable Serialization and Web Services
f you’re working with traditional ADO.NET data types – like the DataTable – in your data access code and wanting to wire up a web service to serve up data, you’ve likely run into some issues. You’re either getting errors due to failed serialization or trying to deal with complex deserialization issues on the other end.
A robust solution would be to create entity types to wrap your data into easily digestible (and serializable) objects. You can roll your own or use an Object/Relational Mapper such as Entity Framework or Telerik’s OpenAccess ORM. Another option would be to use a custom converter. But if you’re after a quick solution, you might just consider converting your ADO.NET objects into other CLR objects that the built-in JavaScriptSerializer knows how to convert, and that are easier to work with in the context of web services.