Showing posts with label updated. Show all posts
Showing posts with label updated. Show all posts

Friday, February 24, 2012

central subscriber

A central subscriber whose table is updated by multiple publishers and the
transactional push replication breaks on one of the publishers.
Does
a. If you do a new snapshot for that publisher does it automatically delete
the existing data in that table for that publisher assuming you have the
proper constraints in place for a unique column and then transactional
replication procedes as normal after the snapshot?
-or-
b. You have to wipe out the whole table and redo all the snapshots, i.e
reinitialize all the subscriptions.
-or-
c. something else
Any hard data in BOL,white papers, or other references to support either of
the possibilities?
a) But only if you user filters, and set up your name conflicts correctly.
To do this, right click on your publication, select properties, click on the articles tab, click on the browse button (the three dots) and then click on the snapshot tab. In the name conflicts section, pick delete all data that matches the row filter.
For Filters click on your Filter Commands tab, and add a filter condition. You might have to make changes to your schema to add a column which uniquely identifies your publisher.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

CE 3.5, VS 2008, Typed Dataset: Get the updated identity of inserted row

Hello,

Using VS 2008 Beta 2, SQL CE 3.5, on desktop, and Typed Datasets: The INSERT command of dataset table adapter does not return the updated identity of inserted row. Why?

also every time I want to modify the insert command to return the updated identity of inserted row, i get the error: "Unable to parse query text."

(Should I post this in Orcas forum?!)

Regards,

Parham.

In order to get the last inserted identity, execute: SELECT @.@.IDENTITY against the same still open connection that executed the INSERT statement. You can only run a single statement in a command against SQL Compact (that's probably why you get the error)

|||

ErikEJ wrote:

In order to get the last inserted identity, execute: SELECT @.@.IDENTITY against the same still open connection that executed the INSERT statement. You can only run a single statement in a command against SQL Compact (that's probably why you get the error)

Tahnks Erick.

This means that if i have inserted some rows into the table and then updated the table to database with the Update command of my Table Adapter, I should REFILL the table to getback the updated identities of the inserted rows?!

Regards,

Parham.

|||

This might help you: http://groups.google.dk/group/microsoft.public.dotnet.framework.adonet/browse_thread/thread/3422d5f0774d605f/34a537895803c758?lnk=st&q=dataset+sql+ce+identity+last+inserted&rnum=1&hl=en#

Alternatively you could use uniqueidentifier columns instead, with a new value of Guid.NewGuid() (set in your code, so you will know the value)

I will do some tetsing later today and revert if there are other options.