Upgrading from older SQL Tool Kit to Compare 8 in C#

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

Upgrading from older SQL Tool Kit to Compare 8 in C#

Postby jasoncwalker » Mon Dec 28, 2009 7:16 pm

Have an application that is distributed internally to run database comparisons. Took over the maintenance of this application from a co-worker that is no longer with the company. Computer crashed and with it, wiped out my license for the older tool kit. Company purchased license files for the newer version, but I cannot get my C# application to use the new compare. Get a trial period expiration error. Need to know how to get the newest compare license to work.
jasoncwalker
 
Posts: 5
Joined: Mon Dec 28, 2009 7:09 pm

Postby Brian Donahue » Tue Dec 29, 2009 11:55 am

Hello,

SQL Comparison SDK (formerly Toolkit) applications are licensed at build-time. If you do a build in Visual Studio and have included the licenses.licx file as an embedded resource according to the instructions, then you [b]will] get a nag requester at that time and you can click the button to enter your serial number and each subsequent build should licence silently.

If your compiled assembly nags the end user, then the licensing probably didn't work.

This is the section of the product help that deals specifically with the licensing:

http://www.red-gate.com/supportcenter/C ... c68944.htm
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby jasoncwalker » Wed Dec 30, 2009 10:38 pm

Got it to accept the right license, but the dependency names must have changed because it is still using the older versions of the DLL's. Any idea on what needs to be changed?
jasoncwalker
 
Posts: 5
Joined: Mon Dec 28, 2009 7:09 pm

Postby Brian Donahue » Thu Dec 31, 2009 10:16 am

You will probably wnat to drop and re-create your references. The "Toolkit" used the SQL Compare program installation folder as the reference path, and SDK version 8 puts the assemblies in the "SQL Comparison SDK 8" folder.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

StatusEventArgs

Postby jasoncwalker » Mon Jan 04, 2010 6:47 pm

So, I changed the references to be the new Redgate.Shared.SQL.dll and Redgate.SQLCompareEngine from Redgate.SQL.Shared.dll and the newest version of SQLCompare engine. Now when I try to compile the application, I get the following error:

Error 1 The type or namespace name 'StatusEventArgs' could not be found (are you missing a using directive or an assembly reference?)

I searched the web to find a solution to this and is appears that this StatusEventArgs was used with the older version of compare, but not with the new one. Any help that you can give me on resolving this issue would be greatly appreciated.
jasoncwalker
 
Posts: 5
Joined: Mon Dec 28, 2009 7:09 pm

Postby Brian Donahue » Mon Jan 04, 2010 7:38 pm

Hi Jason,

You have to add a reference to RedGate.Shared.Utils.dll in order to use the StatusEventArgs. Some of the more commonly-used classes had been moved from *.Engine.dll to RedGate.Shared.Utils.dll and RedGate.Shared.Sql.dll because a lot of these classes are shared between SQL Compare and SQL Data Compare and we wanted to eliminate some duplication.

At some point I believe someone decided to rename RedGate.Sql.Shared to RedGate.Shared.Sql as well, so depending on the version you're migrating from you may want to eliminate the outdated reference altogether. Also, don't forget RedGate.Shared.Utils and RedGate.Shared.Sql namespaces in the using commands at the top of your code files.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

BlockSaver/BlockExecutor/ExecutionBlock

Postby jasoncwalker » Mon Jan 04, 2010 8:33 pm

What dll do I need to add as a reference for BlockSaver, BlockExecutor and ExecutionBlock.
jasoncwalker
 
Posts: 5
Joined: Mon Dec 28, 2009 7:09 pm

Postby Brian Donahue » Tue Jan 05, 2010 11:03 am

You will find all of the dlls that the classes reside in are documented in the help. ExecutionBlock, etc are in RedGate.Shared.SQL.dll.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests