I had a dataset with one table wich contained some null fields; this
dataset was send to client and then untouched back to server and I
received an error like this: "Cannot set the Column "ColumnName". Use
DBNull instead.

I solved it fast creating my custom datatable converter derived from
DataTableConverter  changing

row[i] = JavaScriptDeserializer.Deserialize((IJavaScriptObject)cols[i],
dt.Columns[i].DataType);

to

object obj =
JavaScriptDeserializer.Deserialize((IJavaScriptObject)cols[i],
dt.Columns[i].DataType);

row[i] = (obj == null) ? DBNull.Value : obj;


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---

Reply via email to