What are the challenges you face when working across database platforms? Take the survey
Options

Need to know how to code the CompareWith method in v13.3.5.6244 after upgrading from v11.1.2.54

Horizon67Horizon67 Posts: 7 New member
Prior to Upgrading to v13.3.5.6244 we had been running v11.1.2.54 and the code below worked fine but now running into the "'CompareWith' is ambiguous because multiple kinds of members with this name exist in class 'RedGate.SQLCompare.Engine.Database" error when trying to recompile on latest version. The last line  where "SourceDatabase.CompareWith" is called is throwing the error.

  Dim sqlCompareOptions As RedGate.SQLCompare.Engine.Options
            sqlCompareOptions = Options.Default.Plus(Options.IgnoreUsers, Options.Default, Options.IgnorePermissions)

            targetDatabase = New RedGate.SQLCompare.Engine.Database()
            'targetDatabase.Status = AddressOf Me.ShowProgressHandler
            ' Register the database
            _currentUpdateStep = 1

            ShowProgressHandler(Me, New RedGate.Shared.Utils.StatusEventArgs(oneHundredPercent))

            targetDatabase.Register(New ConnectionProperties(_connectionStringParts.ServerName, _connectionStringParts.DatabaseName, _connectionStringParts.UserName, _connectionStringParts.Password), sqlCompareOptions)

            sourceDatabase = New RedGate.SQLCompare.Engine.Database()
            'sourceDatabase.Status = AddressOf Me.ShowProgressHandler

            _currentUpdateStep = 2
            sourceDatabase.LoadFromDisk(unzippedFileName)
            ShowProgressHandler(Me, New RedGate.Shared.Utils.StatusEventArgs(oneHundredPercent))

            _currentUpdateStep = 3
            Dim databaseDifferences As Differences = sourceDatabase.CompareWith(targetDatabase, sqlCompareOptions)
Tagged:

Answers

  • Options
    The SQL Comparison SDK was retired last year. Version SQL Compare 13 has never had an SDK release - the last version was 12.3. See this forum post for more information - https://forum.red-gate.com/discussion/81556/retirement-of-sql-comparison-sdk

    If you've just copied the DLLs from SQL Compare then we don't support this. There is no longer a public API and there will be breaking changes such as the one you have experienced.
    Software Engineer
    Redgate Software
  • Options
    Horizon67Horizon67 Posts: 7 New member
    Ok, so for my purposes without having to rewrite some logic I should look into version 12.3 is what your trying to say? 
  • Options
    Yes, that's correct.
    Software Engineer
    Redgate Software
  • Options
    Good Morning, sorry for not getting back with you right away. The initial reason i upgraded to v13 was that it was deemed to be the version that supported SQL 2016 and I had been told that v12 did not support it. I see the last SDK release was in v12 but I have no idea how it relates to what i'm using. How did you use the error message provided to determine i was using SDK and not just a function of SQL Compare? What are the steps to take to perform the same process but in v13 if there is a call in the current code that is no longer supported as it was an SDK related function? Thanks!
Sign In or Register to comment.