.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

Capture event when data is updated

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :Sql Server
I want to capture the event when a row in a table is updated and send selected items from that row in an XML format to a HTTP interface.

My thinking of how to capture the event would be either a trigger on the table or having a separate application which maybe running on another server capture the event. If I used a trigger how do I format the selected items from the table into an XML format and send it to a HTTP interface? If I used a separate application which could be a WCF Service then how do I subscribe to the table update event as to format into XML and send to a HTTP interface is straight forward.

My preference would be to use a WCF Service as it seems to me this is more flexible and I don't have to deploy anything on the SQL Server.

View Complete Post

More Related Resource Links

Form Filler: Build Workflows to Capture Data and Create Documents


Learn how to create a workflow that uses InfoPath forms and other office documents for passing data to targeted activities and for use in Office documents.

Rick Spiewak

MSDN Magazine June 2008

SQLXML 3.0: Build Data-Driven Web Services with Updated XML Support for SQL Server 2000


XML is becoming the ubiquitous data format on the Web, and XML support in SQL Server is evolving to meet the additional demand. Using XML, SOAP, HTTP, and SQL Server, you can now build powerful Web Services easily. To show just how simple it is with SQLXML 3.0, this article walks the reader through the process step by step, from setting up a virtual directory enabling data access via HTTP to executing queries and building Web Services. Finally, the author illustrates the creation of two Web Services clients-one with C# that works with the Microsoft .NET Framework and one with the SOAP Toolkit 2.0 for anyone still using earlier development tools.

Christian Thilmany

MSDN Magazine May 2002

Capture event from HierarchicalDataSource


I have a custom hierarchical data source based on the msdn example (http://msdn.microsoft.com/en-us/library/system.web.ui.hierarchicaldatasourcecontrol.aspx).  An event can be raised in the DataSourceView.  If that occurs, I want to display a message on the web page.

The example is that I have a page with a TreeView control which uses a custom hierarchical datasource.  If the user selects a node that they are not allowed to select, the underlying datasource will throw and error.

I want to capture this and add a message to the page.  The Page_Error event is raised, but there are no eventargs.

Anybody know how to capture such an event? 

An alternative approach, although not quite specific enough, is to set a flag during the datasource load event (indicating the datasource is loading) and test for this flag in the Page_Error routine.

Ajax Accordion to load data from client click event


I have a Ajax Accordion control on my page with treeview in Content Template. As the treeview for each pane are big. I am wondering whether I can load the treeview from codebehind only after the pane is selected. I can reuse the code from ItemDataBound of Accordion control.

Cube Refreshment with Data updated in Table

HI All, I have cube which is MOLAP,and i have created SSIS package to process the cube,now i want to start the job as soon as data got uploaded into the Relational database. Please guide me in this as i am new to ssas. Regards Shraddha

Data That is continually updated

Hi,I was asked this question in an interview and wasn't exactly sure how you would implement it. I was given a brief overview of the situation. multiple wpf applications that connect ot a wcf service and a wcf service that connects to a db.The told me the data in thew db is continually changing (and not by the WPF apps). So they asked me how I would keep the wpf apps provided with the latest data. So I am assuming there is another app e.g. windows service that is continually polling the data?Its basically I guess very similar in style to a trading application.Any thoughts would be most welcome. Thanks.

How to Capture a DropDownList Selected Index Change Event

I have a gridview that receives data based on selection from a primary dropdownlist object. Works. Within the gridview, there is a dropdownlist whose selected index is based on the query from the primary dropdownlist. Works. Problem. How do I force the used to  change whatever value that the dropdownlist contains after they make their initial selection from the primary dropdownlist; except the default value of "Please make a selection". Gridview, contains a checkbox which drives whether a selected row is inserted into the data base. The databind in done using an ObjectDataSource on the presentation page, not in the code behind.   Thank you.   Ayomide 

e.Result when data source was shaped? - linqdatasource selected event - LinqDataSourceStatusEventArg



How do I handle using e.Result when my datasource was shaped (select new{})? example aspx markup below:

<asp:LinqDataSource ID="ldsMain" runat="server" 
                    Disposition.Substring(0, 2) as Status)"
        onselecting="ldsMain_Selecting" onselected="ldsMain_Selected">    

1) since I shaped, it's an anonymous type right? so what do I cast e.Result to in order to be able to get at the data? 

2) I am thinking of using the selected event to handle some conditional page setup based on whether or not any results were actually found from the main query (the one that is used to bind data to a gridView via this linqdatasource control)... so I need to check for count > 0 and if it is, I need to fill a few dropdown controls based on a few new queries that will essentially be some select dis

pass data to event in workflow



i have the event that calling  my workflow to start,then this workflow when is completing must passing data to this event.

how i can call(and pass data to)event in sequential workflow programming?(in sharepoint2010,visual studio2010) 


Capture event of a POP UP Window from the Caller window

I have two .xaml pages in my application from the button click of 1st .xaml page i m doin secondpage.showDialog() so the second page comes up as a popup.
There is a button on the second page too.

Now i want that the click event of the button on the second page, to be captured on the first page.

How do i do that

Regards Kuldeep Gupta

how to capture url and show the hyperlink button data output in console application


i have an assignment , i have to capture a url which contain some hyperlink btn,  i have to show the hyperlink btn text and their description

How to capture event when the document is being openned from Documents Library in Sharepoint 2010?


Dear All,

I want to capture the event when user click on document in document library. Please let me know how to capture this event in SharePoint 2010?


Sachin Jagtap


how to capture Clieck Event using javascript for pop up screen


Hi ,

I have code for popup screen , but i want to capture some value on click also ,from code behind but not able to capture


below are code 








string modaljs = "function " + radarLimitedCtl.ClientID + "OpenEnlargeMapModalPopup() { $('#" + pnlEnlargeRadar.ClientID + "').showModal(); document.getElementById('" + iEnlargeRadar.ClientID + "').src = '/Controls/Radar/Radar.aspx'; } function " + radarLimitedCtl.ClientID + "CloseEnlargeMapModalPopup() { $('#" + pnlEnlargeRadar.ClientID + "').hideMod

Custom Form Field in Collect Data Action doesnot capture multiple users.


I have a situation where the department head dynamically assigns the reviewers depending on the document that is uploaded. To capture the reviewers I added a Collect Data Action and a "Reviewers" form field, with type "Person/Group" and checked the following properties

1. Allow selection od People and Groups, 2. Choose from all users and more importantly 3. Allow multiple users

Although I am able to enter multiple users in the form, I am able to retrieve only the first user I entered and the rest just.. disappear!

Change data capture question ...



can i use a sinlge cdc table for multiple tables ?

i want to query to all changed data within a single query. how to accomplish this ?

thanks in advance


Change Data Capture Question


I'm learning CDC by using it to create a very simple replication process. Let's say I have CDC set up for tables 'A' and 'B', which happen to have a FK relationship where 'A' is the parent and 'B' is the child. I want to replicate changes to these two tables to another DB.

I'm wondering how best to handle the following scenario. Let's say a user enters a new row in 'A' and then a child row in 'B'. When I go to move this data to my target DB, I need to make sure I move the data in the correct order or I'll get a FK constraint error in the target DB.

The only way I know to do this is as follows:
1) Query the cdc.lsn_time_mapping table and get all the new LSN values in ascending order. 
2) Look for each LSN value in each cdc table by executing the fn_cdc_get_all_changes_??? UDF associated with each cdc table
3) When an LSN value is found in a table, move the data in that to the target DB
4) Repeat #2 until done

With only two tables, as in this example, this is a trivial process. But if I have hundreds of tables with CDC enabled, step #2 could really be slow since I could be quering every CDC enabled table looking for the curre

how to add multiple rows in a data table against a button click event


how to add multiple rows in a data table against a button click event, and then show it in a gridview

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