Programming Subscriptions to a Jet 4.0 Database

Microsoft® ActiveX® replication controls can be programmed to synchronize data with a Microsoft Jet 4.0 database. This enables applications to synchronize subscriptions to Jet 4.0 databases without having to create an OLE DB data source.

This example demonstrates how a Microsoft Visual Basic® program can configure the SQL Merge control to synchronize data with a Jet 4.0 database:

Examples

'Initialize the replication control.

Dim oSQLMerge As New SQLMerge

  

'Configure the control for a Jet 4.0 database subscription.

oSQLMerge.Publisher = "PublisherName"

oSQLMerge.PublisherDatabase = "PublisherDatabaseName"

oSQLMerge.Publication = "PublicationName"

oSQLMerge.PublisherSecurityMode = DB_AUTHENTICATION

oSQLMerge.PublisherLogin = "Login"

oSQLMerge.PublisherPassword = "Password"

oSQLMerge.SubscriberDatasourceType = JET4_DATABASE

oSQLMerge.SubscriberDatabasePath = "c:\test.mdb"

oSQLMerge.Subscriber = "SubscriberName"

oSQLMerge.SubscriptionType = ANONYMOUS

oSQLMerge.SubscriberSecurityMode = DB_AUTHENTICATION

oSQLMerge.SubscriberLogin = "Admin"

oSQLMerge.SubscriberPassword = ""

  

'Synchronize the data.

oSQLMerge.Initialize

oSQLMerge.Run

oSQLMerge.Terminate

  


Note The above properties are the same for both the SQL Merge and SQL Distribution controls. You can replace references to the SQLMerge object with references to the SQLDistribution object.


See Also

About Access Subscribers

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.