RE: SQL 2005 and SQL Express VS2005 July CTP Merge Replication
- From: Raymond Mak [MSFT] <RaymondMakMSFT@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 29 Aug 2005 10:07:01 -0700
Hi Mike,
For the [STAThread] property to work, it must be used on the "first" method
of a thread. If you want to change the main thread of a process to be an
STAThread, you would have to decorate the Main method of the program with the
[STAThread] attribute. I am guessing that in your case, only the method
immediately wrapping the call to mPullSub.SynchronizationAgent is decorated
with the [STAThread] attribute. In any case, we can probably figure out
exactly what is going if you can post a few relevant code-snippets here.
HTH
-Ryamond
"msmith" wrote:
> When I execute
> (MergePullSubscription)mPullSub.SynchronizationAgent.Synchronize() I get an
> error {"The MergeSynchronizationAgent class must be instantiated on a
> Single-Threaded Apartment (STA) thread."}, but as far as I can tell it is. I
> even added the attribure [STAThread] and still get the error.
>
> Thanks Mike Smith
.
- Follow-Ups:
- References:
- Prev by Date: Replication Problem, Please Urgent Help!
- Next by Date: Adding a table to a publication
- Previous by thread: Re: SQL 2005 and SQL Express VS2005 July CTP Merge Replication
- Next by thread: RE: SQL 2005 and SQL Express VS2005 July CTP Merge Replication
- Index(es):
Relevant Pages
|
Loading