Friday, March 30, 2012

Replication Error in Visual Basic

Hi Group,
I have an SQL Server with a database called support for which I have setup a
merge replication subscription called "support".
On my laptop, I have a support program using MSDE locally to access an exact
copy of the data as the main SQL server has.
Whenenver I try to synchronise using the SQLDistribution activeX control, I
get the following message:
"Cannot create transactional subscription to merge publication "support".
The publication type should either be transactional(0) or snapshot(1) for
this operation."
The trouble is, how I see it, I have to used merged because several clients
would have disconnected data sources and any or all could effectively change
the data.
Any help on this appreciated.
Jim
I think your script is wrong. Could you post it here?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
|||Hi Hilary,
Thanks for the reply. I figured out I actually needed to use the "merge"
activeX control and not the distribution one. My code is below but I am
still receiving this error:
"The merge process was unable to add the pull subscription from
'JBHOME':'Support:'Support'."
JBHOME being my SQL server, support being the database name and also the
publication name. I have tried various variations on the below code but to
no avail.
-- CODE: --
With SQLMerge
.Publisher = "JBHOME"
.PublisherDatabase = "Support"
.Publication = "Support"
.PublisherSecurityMode = NT_AUTHENTICATION
.Distributor = "JBHOME"
.DistributorSecurityMode = NT_AUTHENTICATION
.Subscriber = "(Local)"
.SubscriberDatabase = "Support"
.SubscriberDatasourceType = SQL_SERVER
.SubscriberSecurityMode = NT_AUTHENTICATION
.SubscriberLogin = "sa"
.SubscriberPassword = "mypassword"
.SubscriptionType = ANONYMOUS
.SynchronizationType = AUTOMATIC
.AddSubscription EXISTING_DATABASE, NONE
.Initialize
.Run
.Terminate
End With
-- END CODE --
Kind Regards
Jim
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:1113405033.118118.312480@.g14g2000cwa.googlegr oups.com...
>I think your script is wrong. Could you post it here?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
|||FYI,
What I am attempting to do is have a server with a database on it and be
able for a vb written client program to "merge" update the remote server.
The clients will use MSDE as their disconnected database, and all this will
work over the internet (hopefully!!!)
Jim
"Reapes" <reapesuk-@.hotmail.com> wrote in message
news:xvb7e.85688$Nr5.22780@.fe2.news.blueyonder.co. uk...
> Hi Hilary,
> Thanks for the reply. I figured out I actually needed to use the "merge"
> activeX control and not the distribution one. My code is below but I am
> still receiving this error:
> "The merge process was unable to add the pull subscription from
> 'JBHOME':'Support:'Support'."
> JBHOME being my SQL server, support being the database name and also the
> publication name. I have tried various variations on the below code but to
> no avail.
> -- CODE: --
> With SQLMerge
> .Publisher = "JBHOME"
> .PublisherDatabase = "Support"
> .Publication = "Support"
> .PublisherSecurityMode = NT_AUTHENTICATION
> .Distributor = "JBHOME"
> .DistributorSecurityMode = NT_AUTHENTICATION
> .Subscriber = "(Local)"
> .SubscriberDatabase = "Support"
> .SubscriberDatasourceType = SQL_SERVER
> .SubscriberSecurityMode = NT_AUTHENTICATION
> .SubscriberLogin = "sa"
> .SubscriberPassword = "mypassword"
> .SubscriptionType = ANONYMOUS
> .SynchronizationType = AUTOMATIC
> .AddSubscription EXISTING_DATABASE, NONE
>
> .Initialize
> .Run
> .Terminate
> End With
>
> -- END CODE --
> Kind Regards
> Jim
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:1113405033.118118.312480@.g14g2000cwa.googlegr oups.com...
>

No comments:

Post a Comment