Object reference not set exception generating script
david.duffett
Posts: 30
I am comparing a particular table using a custom comparison key and a WHERE clause and now cannot generate scripts or synchronise databases as an "Object reference not set" error is appearing.
* The table compares records on a column which could be NULL
* The WHERE clause for the comparison restricts records to where this column IS NOT NULL
* Columns included are 2 varchar columns, 2 varchar(max) columns and the comparison key.
The comparison works fine and differences are shown, but I cannot generate scripts, update a folder or synchronise a database, as at the "Generating SQL scripts" stage it shows:
"Object reference not set to an instance of an object."
* The table compares records on a column which could be NULL
* The WHERE clause for the comparison restricts records to where this column IS NOT NULL
* Columns included are 2 varchar columns, 2 varchar(max) columns and the comparison key.
The comparison works fine and differences are shown, but I cannot generate scripts, update a folder or synchronise a database, as at the "Generating SQL scripts" stage it shows:
"Object reference not set to an instance of an object."
This discussion has been closed.
Comments
I can't say what is causing the null-reference exception without debugging SQL Data Compare, but my first advice would be to get the latest cumulative patch and see if that fixes it.
http://www.red-gate.com/messageboard/vi ... hp?t=10917
If it still happens in the new version, get in touch with us via email and we will send the debugging instructions.
I'm experiencing the same issue, with the latest update installed (8.1.1.74).
In my case it occurs when trying to generate the scripts for a comparison between a database and a scripts folder. The records are also limited with a "where" filter (to 1 record).
Generating a script for a change "Source Only" gives no errors. But when I try to generate a script for 1 record that has different data, the error is thrown.
More specifically I have chosen "Update scripts folder" and none of the two checkboxes are selected. When I click "Next", the dialog pops up and puts a red cross in front of "Calculating script changes" and at the bottom the "Object reference not set to an instance of an object" message is shown.
I don't know if this is helpful, but the data being scripts includes a binary column.
Thanks for looking into this.
grts
Erwin Dockx
Error appears both in command line and application when trying to update scripts folder, exactly as edockx has described.
This is a simple comparision without any filters. Even happening if I only select a single table to sync.
Tim Goldstein
Denver, CO