Unable to cast object error
lculley
Posts: 36
Hi--
I'm using version 5 of sql compare and I am trying to compare two databases and I'm getting the following error:
"Unable to cast object of type 'System.DBNull' to type 'System.String'.
Even when I try to compare the same database to itself I get the same error. I am able to compare other databases.
Any ideas why I'm getting this?
Thanks,
Laura
I'm using version 5 of sql compare and I am trying to compare two databases and I'm getting the following error:
"Unable to cast object of type 'System.DBNull' to type 'System.String'.
Even when I try to compare the same database to itself I get the same error. I am able to compare other databases.
Any ideas why I'm getting this?
Thanks,
Laura
Comments
Redgate Software
I am still getting this error in SQL Compare 6.2.0.271. I think it is some sort of permissions thing because if I log in as SA it works. Is there a list of DB permissions somewhere needed to use this tool?
https://www.red-gate.com/support/kb/KB200707000072.htm
The error is caused by one of the queries we use to get information from the database returning a NULL value unexpectedly, which may happen if you have an object which you don't have permission to find out certain information about.
If you're following the advice in the article and still having problems, please contact us again and I'll have a look into whether there are actually other permissions required to get all the information out of your database.
Redgate Software