Outlook Contacts Sync SQL Server – Iteration 1 Prerequisites
- Visual Studio 2010 SP1
- Outlook 2012
How to install AdventureWorksLT2012_SyncSample database
The AdventureWorksLT2012_SyncSample database can be installed using the
CREATE DATABASE statement or by attaching the database.
To install AdventureWorksLT2012_SyncSample database
-
Download
OutlookSyncSQL.zip
.
-
From the License Agreement, click I Agree.
-
From File Download, click Save and browse to a location on your desktop.
-
Unzip OutlookSyncSQL.zip and copy \Database\AdventureWorksLT2012_SyncSample_Data.mdf to a folder.
-
From SQL Server Management Studio, execute the following code:
CREATE DATABASE AdventureWorks2012 ON (FILENAME = '{drive}:\{file path}\AdventureWorksLT2012_SyncSample_Data.mdf’) FOR ATTACH_REBUILD_LOG;
As an alternative to step 4, you can attach the database using the SQL Server Management Studio user interface. For more detailed information, see
Attach a Database (SQL Server Management Studio)
.
Note:
You must remove the log file from the list of files to attach. This will cause the operation to rebuild the log.
How to compile Iteration 1
Outlook Contacts Sync SQL Server – Iteration 1 includes a set of unit tests. The unit tests demonstrate
- How to use relevant Outlook properties and methods with SQL Server.
- How to perform CRUD operations against a modified version of AdventureWorksLT2012.
To run the unit tests, you will need to compile the OutlookSyncSQLAddin project before the MyDataTestProject (unit test) project.
Example Unit Test
How to run Iteration 1
To run iteration 1, open OutlookSyncSQL.sln in Visual Studio 2010 and run the sample.
Note The sample source project will install the OutlookSyncSQLAddin Outlook 2010 add-in.
