Can anyone give me a link to some examples( or some sample code) on how to
"start sycronizing" a merge replication agent using SQLDMO ?
Dim objJob As SQLDMO.Job
Dim objQryResult As SQLDMO.QueryResults
Dim sMergeJobID As String
sMergeJobID = 'SQLDMOJobExecution_Idle=4 If objJob.CurrentRunStatus <> SQLDMOJobExecution_Executing Then Regards, Mike
Set objJob = objServer.JobServer.GetJobByID(sMergeJobID)
> "start sycronizing" a merge replication agent using SQLDMO ?
If objJob.CurrentRunStatus <> SQLDMOJobExecution_Executing Then
The code you sent works fine, thanks.
By executing this in a try-catch (VB.Net), I assume I can display the
Now let's say that syncronization is done. How can I get some information
about the conflicts (at least the names of the tables with conflicting
Is this information stored on the subscriber or on the publisher? This is
important to me because in my application syncronization will occur once a
day, or by demand. Anyway, I would like to offer to the end user some kind
of "conflict log"(or at least a list with the conflicts occured when the
last Sync has run).
objServer.Replication.ReplicationDatabases(sSubscriberDB).MergePullSubscripQuote:> Try something like the following to start the Merge Agent on demand.
> Dim objJob As SQLDMO.Job
> Dim objQryResult As SQLDMO.QueryResults
> Dim sMergeJobID As String
> sMergeJobID =
> If objJob.CurrentRunStatus <> SQLDMOJobExecution_Executing Then
> End If
> > Can anyone give me a link to some examples( or some sample code) on how
> > "start sycronizing" a merge replication agent using SQLDMO ?
> > Thanks
I'm setting up a merge replication between MSDE and a full SQLServer. I wish
to start a synchronisation from within my VB-application using SQLDMO.
I purchased the book 'Professional SQL Server 7.0 using SQL-DMO, SQL-NS &
DTS' of Rachelle Reese and Frank miller but unfortunately did not find any
samples of really starting a predifined/pre-scripted merge-replication.
I'm looking for a few number of code-lines in VB to access the SQLDMO-object
that should do a 'synchronise now'. Did anyone of you wrote these allready ?
Their even should be a way of using a progressbar to show the status of the
replication. Once I bought the book, this seemed not to be handled in the
Can anyone help me with some lines of code ?