Invalid Cast

Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
edited October 4, 2004 12:03PM in SQL Compare Previous Versions
Hi Michael,

There is a new version coming out in the next few weeks, and the way
that it handles collections is being changed. I think that this should sort
out ths problem as well as the 'index was out of range' error.

Kind Regards,

Brian Donahue
Red Gate Technical Support

"Michael A. Floyd" <mike.floyd@amhealthways.com> wrote in message
news:7m7fcvjAEHA.1216@server53...
> When is Red-Gate going to acknowledge one of its bugs and offer a
> correction. Twice I have called to report the following problem. When
the
> DB Compare gets to the second database and tries to register it, it
> immediately presents an invalid cast error. I have reported this problem
> twice to no avail. I am running 3.1. Here is some interesting
information,
> if I script the entire database and then use that script to create the
same
> database, the compare DOES NOT FAIL. Any ideas?
>
>

Comments

  • Hi Glen,

    Do all of the database objects have an owner? I don't know exactly how it happened, but on one occaision a user had a database with a table in it that had no owner. That made SQL Compare try to compare a text value to a NULL value, which caused an invalid cast exception.
  • Object cannot be cast from DBNull to other types

    Is this similar to the topis above, and it not how do I solve this error when trying to do a comparison.

    Thank you
    "On the Road of Life there are Passengers and Drivers, Which Are You....?"
  • Is there any way you can get a copy of the database which gives this error to me? The best way would be to back it up, zip it, and e-mail it to me at support@red-gate.com

    - Neil
    - Neil Davidson
    Red Gate Software Ltd
  • Do you want me to send you both databases, I dont get the error until I do that sync. The datanases work fine before the sync is done. Do you still want to databases?
    "On the Road of Life there are Passengers and Drivers, Which Are You....?"
  • Yes please.
    - Neil Davidson
    Red Gate Software Ltd
  • Do you want a copy of the database before or after the sync is done?
    "On the Road of Life there are Passengers and Drivers, Which Are You....?"
  • Can you give a copy of the databases in the state they're in when you get the error please.
    - Neil Davidson
    Red Gate Software Ltd
  • it is on it way

    Thank you Neil
    "On the Road of Life there are Passengers and Drivers, Which Are You....?"
  • Thanks for e-mailing me the backups.

    It seems like something odd has happened to the database. If you run an sp_help against Nightly_Print_Log on DB_2_4_Neil.bak then you'll see that the seed and increment values for the identity columns are both NULL. This should never happen. If you go into Enterprise manager and change the seed and increment values to something else (eg to 2, and then back to 1) then that should fix it.
    - Neil Davidson
    Red Gate Software Ltd
This discussion has been closed.