RedGate.SQLCompare.Engine Namespace : Project Class |
A SQL Compare project.
For a list of all members of this type, see Project members.
|
System.Object
RedGate.SQLCompare.Engine.Project
[Visual Basic]
Public NotInheritable Class Project
Implements IRedGateSerializable
[C#]
public sealed class Project : IRedGateSerializable
[C++]
public __gc __sealed class Project : public IRedGateSerializable
[C++/CLI]
public ref class Project sealed : public IRedGateSerializable
Use this class to load projects generated by SQL Compare, or to save projects for SQL Compare. Note that a project contains only connection information. It does not contain information about database schemas.
This example shows how to save and load a project.
[C#]
Project project1=new Project();
//by default DataSource1/DataSource2 are created as a LiveDatabaseSources with
//the server name set to "(local)".
project1.DataSource1.DatabaseName = "WidgetProduction";
project1.DataSource2.DatabaseName = "WidgetStaging";
//this project can now be opened up in SQL Compare
project1.SaveToDisk(@"c:\A sample project.scp");
//load the project from disk
Project project2=Project.LoadFromDisk(@"c:\A sample project.scp");
Console.WriteLine(project2.FileName);
[Visual Basic]
Dim project1 As New Project()
'by default DataSource1/DataSource2 are created as a LiveDatabaseSources with
'the server name set to "(local)".
project1.DataSource1.DatabaseName = "WidgetProduction"
project1.DataSource2.DatabaseName = "WidgetStaging"
'this project can now be opened up in SQL Compare
project1.SaveToDisk("c:\A sample project.scp")
'load the project from disk
Dim project2 As Project = Project.LoadFromDisk("c:\A sample project.scp")
Console.WriteLine(project2.FileName)
Namespace: RedGate.SQLCompare.Engine
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: RedGate.SQLCompare.Engine (in RedGate.SQLCompare.Engine.dll)
Project Members | RedGate.SQLCompare.Engine Namespace
© 2003 - 2007 Red Gate Software Ltd. All Rights Reserved.