Friday, March 9, 2012

OnSynchronization

can someone please show me how to call the

ISSCEStatusReporting.OnSynchronize(DWORD Percentage)

callback during synchronization? there is a StatusReportingHandler property of the replication object and a OnSynchronizanion method, but i don't see how this all connects.

This page describes the OnSynchronization method, but it doesn't show how to use it.

http://technet.microsoft.com/en-us/library/ms174139(SQL.90).aspx

This page describes the StatusReportingHandler, but it doesn't show how to use it.

http://technet.microsoft.com/en-us/library/ms173247(SQL.90).aspx

It does mention get/put_StatusReportinHandler methods, but i don't see to use them in VB.NET

i need to use the COM interface to the compact edition, not the .NET library Data.System interface because i'm doing a proof of concept for some delphi guys will be using the COM interface.

Public Class Form1
Private Sub btnSynchronize1_Click(ByVal sender As System.Object,

ByVal e As System.EventArgs) Handles btnSynchronize1.Click


Dim repl As SSCE.Replication


repl = CreateObject("SSCE.Replication.3.0")

repl.InternetURL = url
repl.Publisher = "Publisher"
repl.PublisherDatabase = "PublisherDatabase"
repl.PublisherLogin = "PublisherLogin"
repl.PublisherPassword = "PublisherPassword"
repl.Publication = "Publication"
repl.Subscriber = "Subscriber"
repl.SubscriberConnectionString = "Data Source=database.sdf"

repl.AddSubscription(DBADDOPTION.CREATE_DATABASE)

repl.Initialize()
repl.Run()
repl.Terminate()


repl = Nothing
End Sub
End Class

thanks,

bryan

This article shows you how to do background sync in .NET: http://msdn2.microsoft.com/en-us/library/bb380186.aspx|||ErikEJ,

thanks for replying to my question, but that article doesn't help me. i'm using the native com interface, not the .NET interface. the native interface does not have the methods specified or take the parameters shown in that article. i do not have an option, i cannot use the .NET interface at this time.

this is the technet page that shows the available objects, methods and properties for native programming.
http://technet.microsoft.com/en-us/library/ms174014(SQL.90).aspx

i am interesting in seeing an example of how to use ISSCEStatusReporting methods and in particular the OnSynchronization method for native programming shown on this technet page.
http://technet.microsoft.com/en-us/library/ms174131(SQL.90).aspx

thank you,

bryan

No comments:

Post a Comment