The following samples illustrate Microsoft® SQL Server™ replication application development in C, C++, and Microsoft Visual Basic®.
When you choose to install replication sample files, the samples are installed to the \Mssql7\Devtools\Samples\Sqlrepl directory. The sample files are stored with their long file names and directory structure in the file Sqlrepl.zip. These files must be extracted before they can be used. You can unzip the file using the -d option to restore the files and directory structure.
The C++ samples are compatible with Microsoft Visual C++® version 4.0.The Visual Basic samples have been created using Visual Basic version 5.0.
The SQL-DMO C and C++ samples have been built for Microsoft Windows® 95 and Microsoft Windows NT® version 4.0 operating systems. All makefiles include project settings only for Intel® x86 and Alpha versions of Visual C++. They have not been compiled or tested on any other hardware platform supported by any other compiler.
For C and C++ sample compilation, the SQL Server development files must be installed to obtain the replication header files. After installation, set your compiler include directory path to contain \Mssql7\Devtools\Include so that the compiler can access the necessary files.
\Mssql\Devtools\Samples\Sqlrepl directory | Description |
---|---|
\Replctl | SQL script that creates a Distributor and sample transactional and merge publications. |
\Replctl\Cpp | C++ language sample. Demonstrates how to include the SQL Distribution and SQL Merge controls in a custom application. |
\Replctl\Vb | Visual Basic sample. Demonstrates how to include the SQL Distribution and SQL Merge controls in a custom application. |
\Resolver | C++ language sample. Demonstrates how to create a custom resolver for use in merge replication. |
\Samppub | SQL script that configures the local computer as a Distributor. |
\Samppub\Repldist | C++ language sample. Demonstrates how to implement the Replication Distributor Interface. |
\Samppub\Sqldmo | Visual Basic sample. Demonstrates how to create a SQL-DMO application that creates a Publisher, publication, and subscription for use in a heterogeneous publishing environment. |