.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

Unexpected behavior of a Parameterized Row Filter for a Merge Article

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :Sql Server

Hi Everybody,

I have a merge publication with parameterized filter articles.

The filter statement of one article is:

SELECT <published_columns> FROM [Common].[StaffRule] WHERE StaffRule.ID IN (SELECT StaffRuleID FROM Common.fnCBCBC_Staff(SUSER_SNAME()))

I have created the snapshot files then created the subscription sucessfully.

The unexpected comes when adding a new record to the [Common].[StaffRule] table which satisfy the filter, but the record does not synchronize to the subscriber database.

View Complete Post

More Related Resource Links

Olap parameterized report using a calculated member as filter

I'm in the following situation : olap parameterized report - using an Analysis Services data provider  - with 4 filters and parameters.   One of the filters - Time dimension and one of its hierarchies - includes 2 calculated members called:  Primary and Secondary, which basically describe a time interval of a day based on some business rules. An Excel pivot tabel retrieves data without any problems. But a SSRS 2008 matrix report fails when picking up one of the calculated members , as it does not support it, just like olap browseren in AS 2008 does not support filtering by any calculated member. So it's difficult to find a good explanations to the users ... I'm not quite sure that using the ole db provider for analysis services in stead of analysis services will solve my problem. That's why following question : Are you absolutely sure that using the ole db provider for analysis services will solve my issue ? If not, is it any other work around ? If yes, are there any tips and tricks of using / typing within the ole db provider for analysis services editor when using parameters. ( I tried it once without any succes and found it quite complicated when it comes to handling expressions with parameters). Thank a lot for your answer. Best regards, Mihai   

Unexpected WPF Button Trigger behavior


I have created a custom button style with triggers for "Keyboard Focus" and "IsMouseOver".

If I give keyboard control to one button while the mouse is over the other, the style works fine. However, as soon as I do "press" the button that has keyboard focus using the space key, the style for the button that is being moused over is reverted as if the control did not have the mouse over. Once the pressed button is released, the mouse over button reverts to the expected style.

This behavior does not occur in other windows programs, e.g. visual studio where the moused over control retains its style.

Here is some sample code to reproduce the issue and the steps:

1. Place mouse over button labeled "Another Button".

2. Press the tab key until the button labeled "One Button" has the style for keyboard focus.

3. Press the space key to trigger the style change for the "One Button" to the "Pressed Button" style. Hold the space bar.

At this point the "Another Button" loses the style for "Mouse Over".


<Window x:Class="ButtonStyleIssue.MainWindow"

Adding triggers to a Merge Replicated published article in SQL Server 2008


Currently running merge replication on SQL Server 2008 10.0.1600 and I have a few questions around the correct procedures for adding and modifying triggers on published articles.  I've searched through the MSDN site and googled this but have not found any definitive information on correct procecdures.

1) When a new trigger is added to a published table do we just have to rerun the snapshot and then re-syncy the subscribers?  Just adding them does not seem to replicate them to subscribers.

2) When an existing trigger is modified should ALTER TRIGGER be used or should the trigger be dropped and then re-added?


SQL Server 2008 Merge Replication article triggers not replicating


Currently running merge replication on SQL Server 2008 10.0.1600 and having issues with adding and modifying triggers on published articles.  I've searched through the MSDN site and googled it but have not found any definitive information on correct procecdures.

We have a replicated table that had 1 trigger on it when it was added to the publication.  That trigger was replicated.  We have since added a 2nd trigger to the table and it is not being replicated to our other server.  I've checked the Article Properties and Copy User Triggers is set to TRUE.  The only difference is the new trigger has NOT FOR REPLICATION in it, but I thought that would only keep it from being executed if a row is effected by the MERGE process.

We have rerun the snapshot and are syncing continuosly and the trigger does not replicate.  Do I have to drop the tablefrom the publication and then re-add it?  Am I missing something? 


Merge replication do not replicate an article itens


Hello people,

Please, I need some expert help. I´ll show you the trouble scenario:

I have a publiser and some subscriber to this plublisher.

This publisher publicate some articles that are filtered by the subscriber id, and other articles that are filtered by the other article id .


  Article A - generic data

  Article B - data restrict to each subscriber


Article A - select * from article_A where article_A_id in (select article_id from article_b where article_id = HOSTNAME)

Article B - select article_id from article_b where article_id = HOSTNAME

When it´s sincronized, only article B values are replicated to the subscriber, and the article_A values do not replicate. (if I do the select at the publisher database the roles are showed)

I have changed the processing_order property like are showed here http://msdn.microsoft.com/en-us/library/ms147310%28v=SQL.90%29.aspx , but the article_A values do not replicate.


Somebody already are passed for this situation, and can show me the light?











Multiple Flat Files Connection manager - unexpected behavior when using wildcard



I want to import multiple text files into a destination file.  This works fine when I point the connection manager directly to the 3 files that I need to import. However, these 3 files will change and sometimes there may be more or less files. Therefore I planned to use a wildcard (*). However, when I use a wildcard in the connection manager I get unexpected results - some of the records get duplicated in the output.  I have demonstrated this issue in  this short video clip. Apologies for the slight buzz / hum on the audio (you can just turn the audio off). 

Any help or advice would be appreciated. 



Using jQuery to Filter Table Rows

The project is using the .net GridView control, so I had limited control over the output HTML code. Still, I think this code can work for most tables. One thing to notice: you should use the class "filterable" on your table or on one of its parents for the code to work.
First, we need a text box:

GridView Multiple Filter AJAX Control

This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.

Custom Editing Behavior for DataGridView TextBox Columns

For various reasons I'm using a DataGridView instead of a ListView, and while configuring the DataGridView to look like a ListView wasn't much of a problem, there's one thing that got on my nerves, which is the behavior of textbox cells in edit mode: It is much too easy to leave the edit mode accidentally, simply by pressing the cursor keys at the wrong time. For example when the text caret is positioned behind the last character of the textbox cell content, and you press the right arrow key

Feature available to Silverlight 4 with VS 2010.

In Part I of this article series we have seen some features available to Silverlight 4 with VS 2010. We will continue to explore more in this article.

Article commenting by line number


I'm wondering what's the best way to approach an online article system that allows users to comment by clicking on the line they are commenting about? Essentially the same way Adobe Acrobat works with comments where you can click anywhere and the text is saved for that location.

I'm assuming a mix of jQuery would be the crux of the interface. The system would need to save comments so that when another user logs in, they will also see the other comments but they can´t edit them - only add their own.

Any suggestions would be great.

reference from menubuttons to text parts in article on the same page


Hi, I'm searching now for hours but couldn't find it.Cry

In my menu i have several buttons which (by a <a href..) should go the a part of an article that is in the same form.

Menu button : What is a database should go to the page default.aspx and in there is an article published.
A part of this article is having a piece of text about "what is a database"

Menu button: how to make a query should go to this same article in the same page but then to the part that is have the piece about the query. The next could be an example of what i'm doing:

    <li><a href="default.aspx ?????>what is a database</a></li>
    <li><a href="default.aspx ?????>what is a query</a></li>

Where my question marks are, there should be a connection to that particular piece of text.
In each article part there is an ID="text1" and the second part id="text2"

How shoudl i do that, Should i use a question mark.
Please give me some guidance how to structure the <li> statement or a pointer where I can read about it.


Run Button Behavior: Suggestion/Bug


Note: This could be a bug or considered as suggestion. I am not looking for solution.

1: I have ImageWatermark.cshtml open and currently in focus.

2: I have Photo1.jpg selected in left Files workspace.

3: Now if I Click "Run", instead of opening ImageWatermark.cshtml it trys to open Photo1.jpg and it fails.

So ideally I would expect the "open file (ImageWatermark.cshtml) to run rather than running the selection from Workspace.

Where to Filter the companies returned by the EF?



I am just starting with dynamic data. I have an enttity framework called UsersModel.edmx.

It returns a list of all companies in the tblCompany table. This list is really big.

I need to filter the list returned to all user controls on the client so that it only returns the company that have a CompanyTypeId= 2 or CompanyTypeId= 3 and company name != "".

1 - Is it possible to filter the company list returned on the server so that I can filter only once for all the controls that use that on the client?

My ideas was to do something like this using linq and lambda but I am not sure how:

return tblCompanys.Where(c => c.CompanyTypeId == 2 || c.CompanyTypeId == 3 && ).Where(c=>c.CompanyName != "").OrderBy(c => c.CompanyName).Distinct().OrderBy(c=>c.CompanyName);

2 - I have created a partial class and a metadata class and added the DisplayColumn attribute to use the company name and sort by company name ascending.

Could I use the code to filter the returned companies in this? where?

namespace MarsMedicalModel
    [DisplayColumn("CompanyName", "CompanyName")]
    public partial class t

Filter by Computed Column



After looking for a driver to open legacy dbf drivers to connect, the next level trouble a have is this one:

first, i can retrieve the data but when trying to filter by a parameter (somesc columns) i get an error.

The error says about the database can't determine some blah blah!

The error is a columm tha is formated (  1234  ) about  8 space, fixed. The values in the query appears like that. I resolve this by Trimming Ltrim(ColumnName) and i get this (1234).

Now in SqlExpress, how can i filter by the new Trimmed Expression? (This is a primary key that the DBF use)


SELECT column1, column2, column3


SELECT Ltrim(column1) as NewExp, column2, column3
Where NewExpre = @NewExpres                  -Error-


LDAP nested groups filter


Hi all,

In my organization we use nested groups.

For a particular usage, we have a group (let's assume that the group name "kuku"), and the names of all the nested groups under it contains "kuku" as well.

We may assume that no other group in the LDAP has "kuku" in the name.

I need to create a filter which will return all the users which belong to one of the "kuku"s group.

Obviously, using this filter will bring only the head kukus

(&(&(objectclass=user)(objectclass=person))(memberOf=CN=kuku,cn=.rest of the group DN.))

How can I use wild card to fetch all users which belong to any kuku?

For example: (&(&(objectclass=user)(objectclass=person))(memberOf=CN=.*kuku.*))



Mail Merge




I am after creating a mail merge documents from datasource and .dot template file on server side. Can you give me an idea how i will achive this?


Thanks in advance.



Syed Hussain



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