Error: "Unable to case object of type 'System.DBNull'..."
ryan_fagan
Posts: 6
Whenever I try to compare a particular database I get an error while "Reading Constraints", "Unable to cast object of type 'System.DBNull' to type 'System.String'." Any ideas? Is there any, more through, logging I can send you?
Comments
Yes -- if you could run SQL Profiler on the server and see what the last query was when the error occurred. This happens from time to time when there isn't the correct information in the database system tables or in one or two rare cases when logging in as a SQL user who doesn't have permissions to all schema objects.
You could try using the sa account for the compare or trying the ignore permissions option. If this works, it's the second (rare) problem.