Comments
3 comments
-
The most common cause of that error is that one of the scripts (not necessarily the one it claims to have finished reading on) has a foreign key that refers to a non-existent table. (Other dependencies with a missing target object may also cause this error, like a view referring to a non-existent table.)
If there's nothing obviously wrong of this nature, or you are reading scripts that were generated by Compare in the first place, tell me and I'll investigate further. -
I encountered this problem while running scripts that are being developed by hand in a text editor. It's easy enough to mess up and break references that way.
With that in mind, it would be very helpful for SQL Compare 6 to show which table(s)/view(s) it choked on, rather than just pass the NullReferenceException to the user. Thank you for considering this enhancement. -
I've added a reference to this thread to the feature request for better error messages on reading inconsistant scripts. Thank you for your report.
Add comment
Please sign in to leave a comment.
X Registering databases
Scripts.Create Scripts-Reading xUsers.sql
Object reference not set to an instance of an object.
The file "xUsers.sql" exists, and contains this:
The T-SQL in question, while trivial, is valid. Yet SQL Compare 6 seems to choke on it when parsing it. Thanks in advance!