Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Using Replication Controls in C# application

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-01-26 : 07:23:06
Jim writes "I have the merge replication control running successfully from a C# application. However, after replication terminates and I set the merge control to null, I receive the following exception:

An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in system.windows.forms.dll

Additional information: External component has thrown an exception.

The program is structured as follows:

1. A main form has a menu item called "replication" which creates an instance of a status form
2. The status form has a button called "Start Replication" which creates an instance of the merge control.
3. If I execute replication, I receive the above error when program control is returning to the status form and then again when control is reutrned to the main form.
4. If I don't execute replication,i.e. the "Start Replication" button is not clicked and the merge control is not created, then I receive the error when program control returns to the main form.
5. If the "replication" menu item is never executed, then the main form exits cleanly.

Any suggestions would be appreciated."
   

- Advertisement -