.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Replication not passing the update

Posted By:      Posted Date: September 30, 2010    Points: 0   Category :Sql Server

Hi there,

I have a publication where i use filter in it (where siteid=1 siteid is not primary key)  but when i update it on publisher the update does not goes to subscribers when i update it 2 times it goes to the subscriber.

Can someone help me please


View Complete Post

More Related Resource Links

SQL 2008:Peer 2 Peer Replication: Update-Update Conflict on the same node


My environment is comprising of 2 SQL servers setup with P2P replication in SQL 2008, 2 Web servers connect to only one SQL server at a time and make changes to the published tables and 2 Application servers which connects to both the SQL servers all the time but they only read data.

We chose P2P since my app servers are in different locations which read data from both the SQL servers and we use it as HA solution.

Since we are changing data at only one SQL server, thought we should never get update-update conflicts but we are now on the same node.

A conflict of type 'Update-Update' was detected at peer 3 between peer 1 (incoming), transaction id 0x0000000000725ca2 and peer 1 (on disk), transaction id 0x00000000007259e9 (Source: MSSQLServer, Error number: 22815)

We are making changes only at Server A and Server B is my backup server.

I made a varchar field updated in 1 row on a table in server A then it gets replicated to Server B
then I made the same field updated for 160 rows on the same table in Server A then it gets replicated to Server B
then I reverted back the change made to the field on all 160 rows on the same table in Server A then my replication failing with Update-Update conflict.

I'm not sure whats causing this because I'm not making any change

update conflicts occur even if rows were updated only at subscribers (Merge Replication)


Hi all, we use Merge Replication as described bellow:

Publisher: SQL Server 2005 Standard Edt with SP3 (on Win Server 2003)

Subscribers: SQL Express 2005 with SP3 (Win XP), pull subscriptions, synchronizing through .NET application (using RMO objects)

Further description: we use both download-only articles and articles with parametrized filters, Publisher acts as its own Distributor

From time to time, update conflicts occur in table where product stock status is stored for sales representatives. Error message states that the same row was updated both at subscriber and at  publisher.

snapshot replication when update records

i configure snapshot replication but it not update records automatically.what is the condition or job time to update records on replicate server. thanks in advance...

using triggers to keep all versions of rows after update, delete + replication

I maintain an application that uses SQL 2005 / 2008 for data persistence.
Some clients use Merge Replication (pull or push) to replicate data.

Some of the tables contain information that should never be erased.
All versions of a row from such a table should be stored, somewhere in a database.

This means all updates and deletes to those rows should result in in 2 affected rows:
• a copy of the row before the change
• a row containing the change (or the deletion of the row in question)

I plan to achieve this using AFTER UPDATE,DELETE triggers on all the tables for which "versioning" is required.
The old versions of a row may be stored in the same database, an other database (or a database on a linked server).

I was hoping to do this by creating NOT FOR REPLICATION triggers on the published database.
The theory was:
All update and delete queries performed against a subscribed database should be replicated (for concurrency) to the publisher.
When the updates and deletes are replicated, the triggers on the published database will be fired, thus also updating the table containing the version rows.

There seem to be 2 problems with this approach:
An update query against a table of the subscriber wil often result in mupltiple update queries performed ag

transactional replication with update-able subscription issues??



I am doing transactional replication with update-able subscriptions and I have come across few issues that have kept me stranded: Here  they are: 

1.can we not drop a table in Transactional replciation with updatebale subscriptions? I was assuming that with this mode, if you drop a table it will drop on subscribers as well?

2.if a new table is created at publisher, only the after running the snapshot agent(before adding the new table to the publisher) it would appear at the subscriber, can this not be automated somthing like if a new table is created, replicate it to the subscriber by itself when next snapshot agent runs, instead of manually adding it to the publisher(of course, it has to have pk's to qualify for replication)

3.In Transactional replciation with updatebale subscriptions, I can see the data changes made at both publisher and subscriber are being applied on both the nodes but when schema changes are made like adding new column, dropping column,  the changes made at subscriber are not being applied on to publisher but the ones made at publisher are being applied on to subscriber? I guess, i should be able to do this on publisher as well with this mode(I think queue reader is responsible for this, (queue reader is running al the time)).

4. what is

Logging and replication of an UPDATE that changes nothing?



I have a table with an UPDATE trigger that is intended to log when changes occur.

I would like to fire that trigger without actually changing any data in the row.

"UPDATE table SET @localvar=1 WHERE whatever;" successfully fires the trigger, and no data is changed.

I'd like to know, however, how this effects transaction logging and replication. Does anything get logged when the before and after state of the row is the same? Does anything get replicated when the before and after state of the row is the same?


ASP.Net Gridview Edit Update Cancel Commands

In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Update Vs SystemUpdate

Many of you might noticed that share point ListItem has Update() method as well as SystemUpdate().

What is the difference between these two methods and why MOSS has two different APIs for updating an ListItem

SqlCommand.ExecuteNonQuery() returns -1 when doing Insert / Update / Delete

Sometimes you end up with a return value of -1 when using the SqlClient.SqlCommand.ExecuteNonQuery method.

Why is that?

Well, the ExecuteNonQuery method is there for statements for changing data, ie. DELETE / UPDATE /INSERT, and the returned value are the number of rows affected by that statement.

When checking the documentation we can see that there are some conditions that return -1.

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command.

When a trigger exists on a table being inserted or updated, the return value includes the number of rows affected by both the insert or update operation and the number of

rows affected by the trigger or triggers. For all other types of statements, the return value is -1. If a rollback occurs, the return value is also -1.

Passing Linq Statement between master and content page


I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!

I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.

On the masterpage, I have the following code:

Private _res

    Public Overridable ReadOnly Property SearchRes()
            Return _res
        End Get
    End Property

 Private Sub DoSearch()
   'some code to get a linq result

    If res.Any Then
            _res = res
            Server.Transfer("SearchResults.aspx", True)
            'no results
            LabelNoRes.Visible = True
        End If
 End Sub

On the SearchResults.aspx page I have this code.

Dim m As pxSite = CType(Page.Master, MasterPage)
        If m.SearchRes IsNot Nothing Then
            Label1.Text = "Results found = " & m.SearchRes.Count
        End If

m.searchRes is always nothing. 

What am I doing wrong here?


>>>How to update multiple rows of gidview by one click



I want to add multiple rows of a gridview if the data for multiple fields are same.

Idea for this is that a user may search a record with some parameter e.g. Sector, plot.

For example 15 records being displayed in gridview.

There should be checkbox before every row and if user wants to update Plot and Flat No that is same for 10 rows out of 15 so he will check the rows and update.

For this a dialog box should appear asking for the parameter i.e. Plot and Flat or something else next time may be it will be City or country. Moreover, there is already an Edit button to update records, when user click it another page open for the record to be updated and whatever he wants to update, it updates.

Hope everone understand the scenario.

I don't want to disturb the already provided Edit functionality and want to provide same record to be updated.

Any idea in this regard would be appreciated.

Visual Studio closes itself by opening aspx-Page designer after Windows Update


Hey Guys,

I've a problem with my Visual Studio.

On the 13th of August 2010 i installed a Windows update on my vista sp2 pc. For this date my Visual Studio 2008 sp 1 always has closed itself by opening an aspx-page in designer view. There is no error message just closing the window. I restored a backup of my windows from the time before updating it and it helped, i could open aspx pages in the design view till the update has been installed again automatically after rebooting the pc. I can't disable windows updates, cause it's my pc at work and safety is very important. I hope you could help me out of this disaster.



Passing values in pages


Hi! Friends..

how to pass the value from one page to another page in asp.net  with out Using State Management Concepts?

Like 1. cookies


        3. QueryStrings

     With out using the above should pass the values...

Update net frame 3.5.


I use visual studio 2008 but It's only use net frame work 2.0, Can I update and use net frame work 3.5 for Visual Studio 2008 ? Please help me !


update/delete not working on server only


my aspx page works in VWD, and everything works on the server EXCEPT update and delete sql functions. any ideas?


Passing Data to a Cell in Excel



I have a webpage that is created in Visual Studio 2008 and programmed in C#.

I have a web form that prompts the user to enter a value into a text box.  For now, I do not have any validation on that field (I will be adding that later).

I need to pass the value that the user has entered to cell C1 of the excel spreadsheet (user_info.xls).

I understand that using excel is not ideal, but unforutnately need to try to make this work with the excel spreadsheet.

I do not have any code for this yet, because I honestly do not know how to begin.

The action of poulating the excel spreadsheet will be intialized from the On Click event of a Submit button.

Any suggestions would be much appreciated.

Thank you in advance for your assistance,


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend