With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
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
|How to base a filter depending on fields contents?||15||49|
|From msAccess SaveAs an excel file SILENTLY without opening excel||4||30|
|Using an Aggregate Function with a not exists in Sql Server 2012||10||23|
|How autonumber field on a form||16||18|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
18 Experts available now in Live!