Options

Error: "Unable to case object of type 'System.DBNull'..."

ryan_faganryan_fagan Posts: 6
edited October 3, 2006 6:02PM in SQL Compare Previous Versions
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

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Ryan,

    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.
Sign In or Register to comment.