Only Console Apps Supported?
jbsound
Posts: 35
It seems that if I want to reference RedGate.SQLCompare.Engine.Database with anything other than a console application in .NET it won't work.
I have added the required references to the .NET (VB WinForms App) project, added the licenses information, added the 'Imports ...' statements, but can't seem to have VS.NET find the RedGate.SQLCompare.Engine.Database reference.
Is the Toolkit only for console applications?
Any help is appreciated!
Thanks,
JB
I have added the required references to the .NET (VB WinForms App) project, added the licenses information, added the 'Imports ...' statements, but can't seem to have VS.NET find the RedGate.SQLCompare.Engine.Database reference.
Is the Toolkit only for console applications?
Any help is appreciated!
Thanks,
JB
Comments
Should be no problem.
I took the SQLCompare code snippit installed by default in
%Program Files%Red Gate\SQL Bundle 5\Toolkit Sample Files\Automating SQL Compare\VB
changed the app over to a "Windows Application" using Visual Studio 2003. Modified the SynchronizeDatabases method to look like (Nb. I changed the databases because they did not exist on my current SQL Box.)
Added a form, made this form the main form of the app, added a label and a button to the form and added the code below behind the button The Windows form mini-app ran fine, clicked the button and all worked as expected. Can you send more information about the error message please?
Regards
David
I've done exactly the same as you have, porting the console application sample to a Windows forms application.
The problem is that Visual Studio doesn't seem to resolve the 'Database' class and reports an error that it could not be found.
As I said, I am referencing the DLLs and included the Imports statement at the top.
So, the issue is to find out what's different between your code and my code.
JB
Either you like you could email me your source or could you try what I did and take the example code snippit shipped with SQL Bundle 5 and turn it into a Windows App?
my email address is
david.connell@red-gate.com
Regards
David
Instead of using the RedGate.SQLCompare.Engine reference, I used the RedGate.SQLDataCompare.Engine reference. Obviously a big difference.
Once the proper reference was used, my problem went away.
Thanks for your time and help!
JB