views:

8

answers:

0

I am writing a Debugger Visualizer for a DataTable to display the datatable as xml instead of in a grid. I am getting an error on the line: DataTable dt = (DataTable)objectProvider.GetObject();

The exception is "Exception has been thrown by the target of an invocation." with an Inner Exception of "Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."

I believe this is happening when GetObject deserializes the DataTable. I'm not sure how to get around this issue though. The DataTable Visualizer doesn't have this problem but the data just isn't formatted the way I want.

I appreciate any help.

Kalvin