At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!
LISTING 1: Creating a Class Module That Uses the Status Event Public WithEvents SQlM As SQLMerge Private Sub Class_Initialize() Set SQlM = New SQLMerge End Sub Private Sub Class_Terminate() Set SQlM = Nothing End Sub Private Function SQLM_Status(ByVal Message As String, ByVal Percent As Long) As SQLMERGXLib.STATUS_RETURN_CODE Debug.Print Message & " " & Percent & "% Done" End Function LISTING 2: The Replication_Merge Function Public New_Merge As New clsMerge Public Function Replication_Merge() Dim Merge_Control As SQLMerge Set Merge_Control = New_Merge.SQlM With Merge_Control 'Set the publisher properties .Publisher = "Your Server Name" .PublisherSecurityMode = DB_AUTHENTICATION .PublisherLogin = "sa" .PublisherPassword = "" .PublisherDatabase = "Pubs" .Publication = "pubs_to_MSDE" .PublisherNetwork = TCPIP_SOCKETS .PublisherAddress = "www.yourcompany.com" 'Set the distributor properties .Distributor = "Distributer Server Name" .DistributorSecurityMode = NT_AUTHENTICATION 'Set your local subscriber properties .Subscriber = "The Local Machine Name/Server Name" .SubscriberSecurityMode = DB_AUTHENTICATION .SubscriberDatasourceType = SQL_SERVER .SubscriberLogin = "sa" .SubscriberPassword = "" .SubscriberDatabase = "pubs_local" .SubscriptionType = ANONYMOUS .Initialize .Run .Terminate End With End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.