Object reference not set to an instance of an object.

izzybizzyb Posts: 6
edited November 22, 2005 10:43AM in SQL Data Compare Previous Versions
Hello,
I am getting this error when trying to use the following: SQLDataCompare" /pr liveNweb_data.sdc. The sdc file works perfectly when I open it using the windows tool, but I get the following error when using the cmd line:

Unexpected error: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
System.NullReferenceException
at _6._3(TableComparisonSetting , Fields )
at _6._2(TableComparisonSettings )
at RedGate.SQLDataCompare.CommandLine.Runner._2()
at RedGate.SQLDataCompare.CommandLine.Runner.GetExecutionBlock()
at RedGate.SQLDataCompare.CommandLine.Runner.Run()
at RedGate.SQLDataCompare.CommandLine.Startup._1(String[] )

How do I solve this?

Thanks,
Izzy
Izzy Bromberg

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Izzy,

    What is the exact command you're giving it? I'd assume that either SQL Data Compare can't open the sdc file or one of the specified tables and columns aren't available to compare.
  • Hello,

    I am getting this error when trying to use the following: SQLDataCompare" /pr liveNweb_data.sdc. as a DOS command

    The sdc file works perfectly when I open it using the windows DataCompare.

    Izzy
    Izzy Bromberg
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    Is that double-quote supposed to be there?
  • Nope you can ignore it.
    Izzy Bromberg
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Thanks... do you get any more information output if you use the /verbose switch?
  • Hello,
    Here is what I get with verbose:
    C:\Program Files\Red Gate SQL Bundle>SQLDataCompare /pr liveNweb_data.sdc /verbo
    se
    SQL Data Compare running with option: Default (OK).
    Loading synchronization parameters from project file: liveNweb_data.sdc
    OK
    Connecting to database 'syntezz_aaaaaa' on 'SYNTEZZA_LIVE'...
    OK
    Connecting to database 'Web_data' on 'SERVER-1'...
    OK
    Comparing database SYNTEZZA_LIVE.syntezz_aaaaaa with database SERVER-1.Web_data.
    ..
    Checking and setting comparison columns...
    OK
    Checking and setting comparison keys...
    Unexpected error: Object reference not set to an instance of an object.
    Object reference not set to an instance of an object.
    System.NullReferenceException
       at _6._3(TableComparisonSetting , Fields )
       at _6._2(TableComparisonSettings )
       at RedGate.SQLDataCompare.CommandLine.Runner._2()
       at RedGate.SQLDataCompare.CommandLine.Runner.GetExecutionBlock()
       at RedGate.SQLDataCompare.CommandLine.Runner.Run()
       at RedGate.SQLDataCompare.CommandLine.Startup._1(String[] )
    
    C:\Program Files\Red Gate SQL Bundle>
    
    Izzy Bromberg
  • Hi Izzy,

    I'd conclude that the comparison key that you'd specified on one of the tables no longer exists. This probably wouldn't keep SQL Data Compare UI from being able to load the project because I'd imagine it probably compensates and automatically defaults to the primary key. Can you try loading the project into Data Compare (UI) and saving it again, then using it in the command-line version?
  • Looks good now. Thanks. :lol:
    Izzy Bromberg
This discussion has been closed.