$595

($744 including support & upgrades)

  • Download 14-day free trial
  • Create a quote for SQL Comparison SDK
  • Add SQL Comparison SDK to shopping cart
SQL Comparison SDK box shot

SQL Comparison SDK

Walk-through: Using Red Gate APIs

This walk-through will show you:

  • Using the SQL Compare API to automate comparison and synchronization tasks
  • Features in the SQL Comparison SDK
  • Building your application
Stop walk-through

Step 4: Creating database objects

Intellisense

We want to compare and synchronize two databases.

To do this, we need to create two database objects that represent the two databases involved in the comparison:

Database db1=new Database();
Database db2=new Database();

db1.Register(new ConnectionProperties(".", "WidgetStaging"), Options.Default);
db2.Register(new ConnectionProperties(".", "WidgetProduction"), Options.Default);

We could choose to use databases from a previously saved snapshot, which would be useful for an offline comparison but, in this case, we have registered databases from a live server.

Note the use of IntelliSense when you are writing code.