June 17, 2003 06:17 PM

Control Replication with ActiveX

Provide on-demand synchronization from client applications
Rating: (0)
SQL Server Magazine
InstantDoc ID #39079
In these days of distributed computing, getting the right data to and collecting it from the remote parts of your enterprise is crucial to the success of your business. And keeping all this data synchronized is no easy task, particularly across low-bandwidth or inconsistent network connections. The situation is even worse for mobile users, such as your salespeople, who often work in disconnected mode, then upload their changes to the database all at once. SQL Server, however, offers a flexible r...

ARTICLE TOOLS

...This article is for paid Professional Members only.

Already a Professional Member? Please log in now:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Professional Membership

Monthly

Annual

VIP Membership

Monthly

Annual

Add a Comment

Instead of a sub use a function that returns STATUS_RETURN_CODE. Exampel code in C#:
public STATUS_RETURN_CODE ReplicationStatus(string message, int percent)
{
this.label1.Text = message;
this.progressBar1.Value = percent;
return STATUS_RETURN_CODE.SUCCESS;
}

Anonymous User 12/2/2004 4:51:20 AM


I think that the event handler changed between SQL Server 2000 SP2 and SP3. Make sure that you are using SP3. After I upgraded to SP3, it worked for me.
Thanks,
Glenn Gailey [MS]
This information is provided "AS IS" with no warranties, and confers no rights.





GlennG 11/15/2004 9:27:52 PM


There is a problem with the code on the following line:
AddHandler myMergeObj.Status, New _SQLMergeEvents_StatusEventHandler(AddressOf myMergeObj_Status)

Its telling me the following:
Method 'Private Sub myMergeObj_Status(message As String, percent As Integer, ByRef retCode As SQLMERGXLib.STATUS_RETURN_CODE)' does not have the same signature as delegate 'Delegate Function _SQLMergeEvents_StatusEventHandler(Message As String, Percent As Integer) As SQLMERGXLib.STATUS_RETURN_CODE'.

AND
Method 'myMergeObj_Status' cannot handle Event 'Status' because they do not have the same signature.


Anyone get this to compile?

Thanks,
Greg

Greg Knierim 9/30/2003 6:10:56 AM


Just a note about wiring event handlers - the use of 'WithEvents' and 'Handles' is enough to wire an event in VB.NET. 'AddHandler' is a separate way to wire events. In other words, you can use either AddHandler or WithEvents/Handles to wire your Status event. If you decide to use AddHandler you don't even need to include 'WithEvents' in your object declaration.

See MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vaconUnderstandingEventHandlers.asp

Matt Hostetler 6/27/2003 6:46:26 AM


You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS

eBooks

Playbook for a Virtualized Datacenter | During challenging times, optimizing the IT infrastructure becomes imperative. Many organizations are looking to extend their virtualization efforts to encompass the entire datacenter. Get a step-through of your technology options and more.

White Papers

As the advances in USB devices have made them invaluable to most business users’, they have also exposed organizations to enormous risks. Learn how to easily enforce device/port control and data encryption policies without requiring new infrastructure and additional admin overhead.

WEB SEMINARS

Is Flexible Lockdown Possible? Join Darren Mar-Elia for this free web webinar exploring the various methods you should consider to protect and control your desktops while also understanding the impact on the end user community.
View Seminar On-Demand.

eLearning Series

Windows IT Pro brings the experts direct to you to share their real-world perspective, experience, and expertise. During each event, three sessions stream in real time, allowing you to learn, to ask questions, and to get solutions.
Upcoming event: SQL Server Consolidation

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.