.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

Multiple mails for OnError Event

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :Sql Server
Hi,I have created an event handler for a task's OnError scenario. The event handler contains a SendMail task, which has the following expression"Package Name: " + @[System::PackageName] + "\n" +"Start Time: " + (DT_WSTR, 30) @[System::StartTime] + "\n" +"Error: " + @[System::ErrorDescription] + "\n" +"Task: " + @[System::TaskName] The target table has a unique constraint, and in order to test my error handling technique, I wantedly introduced duplicate records in my source. What happens is, I get three different email, with three different error codes.  I am pasting the mail contents here:Mail1:Package Name: PackageStart Time: 1/6/2010 11:13:05 PMError: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E2F.An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E2F  Description: "The statement has been terminated.".An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80040E2F  Description: "Violation of PRIMARY KEY constraint 'PK_ts_installs'. Cannot insert duplicate key in object 'dbo.ts_installs'.". Task: DFT_INS_TS_INSTALLS_ERROR Mail2:Package Name: PackageStart Time: 1/6/2010 11:13:05 PMError: SSIS Error C

View Complete Post

More Related Resource Links

Is it possible to use multiple date fields to have an event show more than once on a Sharepoint 2007

Hello, Is it possible to use multiple sets of start and end times to have events display multiple times in a sharepoint calendar? To clarify: - I have the standard fields of "Start Time" and "End Time" in my calendar list. - Events show on the calendar just fine. - Would like to create additional fields called "Start Time 2" and "End Time 2" within the same record and have the event show multiple times on the calendar. - The recurrence functionality of sharepoint will not meet my needs because the pattern I need to use is not in one of the allowed choices. Thanks in advance, John

C# Problem with multiple SerialDataRecieved event handlers

Hi all, I'm relatively new to C# and have no formal programming experience so apologies in advance if the way I do things are bad practice etc - I generally implement things in a way which seems logical to me! As a small project I'm making a toy car which can drive itself, the problem I've currently got is reading data from two serial port devices at once. The way I tend to work is to write smaller applications to do one function and get that working before integrating it into a larger application which will pull all the functions together. I've written a "Serial_Port_Communications" class which allows you to pass a serial port object into it and then perform some typical functions: open a port, close it, read data, write data etc. Thats common code across all of my serial devices (they all need to do the same operation so why re-write it?) Then for each device I've got a class which handles the operations and data specific to it: GPS & Compass. Each of those two create instances of the Serial_Port_Communications class. In the GPS & Compass classes, they each have a SerialPort object which has an eventhandler assigned to it for when data is received e.g GPS.datareceived += & Compass.datareceived +=... They each work flawlessly when they run as the mini-applications i.e. I can Parse the GPS data that is received and I can read

application_start event called multiple times in MVC application

hi, In my MVC application ,I am updating my web.config at runtime through application_start event.So, ideally it should be done only when the application is started.BUT in MY mvc application the application_start event of global.asax is being called multiple times , even when i have not restarted the application. Its being repetadly called when i am calling different actions , so the webconfig is repetedly updating & making my application very very slow. Can you please let me know , what's the reason & how to handle this .   Thanks in advance gbhatnagar    

Multiple instance of User Control on Page - Button Click Event

Hi, I have this Web User Control, with 3 controls:<asp:TextBox ID="txtSearch" runat="server" /> <asp:RequiredFieldValidator ID="rfvSearch" runat="server" ControlToValidate="txtSearch" Display="None" /> <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click" /> In code behind: protected override void Render(HtmlTextWriter writer) { rfvSearch.ValidationGroup = this.ID + "_validation"; txtSearch.ValidationGroup = this.ID + "_validation"; btnSearch.ValidationGroup = this.ID + "_validation"; base.Render(writer); } protected void btnSearch_Click(object sender, EventArgs e) { Response.Redirect("ResultadoSearch.aspx?argumento=" + txtSearch.Text); } When I try to add two UserControl and I Click in btnSearch of second UserControl, txtSearch.txt returns value of first User control.How I can get the value of second txtSearch?

WPF Datagrid SelectionChanged event is triggering Multiple times while loading the rows.



When i use DataGridComboBoxColumn in my WPF DataGrid, the DataGrid SelectionChanged event is triggering multiple times based on the number of rows while loading the rows in the WPF DataGrid.

How can i stop this? Because of this I am facing Performance issue.



Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This will help other members to find the solution easily.

How can I process multiple buttons with one click event?


I want to dynamically build a table where each of the first three cells may or may not contain an image.  If a cell contains an image, it may or may not contain a radio button.  The last cell contains a button or link button.  I want all the buttons to be handled by the same click event.  The number of rows, which cells will have an image, and which cells will have a radio button is not known at design time.  Finally, the images are displayed using the better image control.

I'm trying to get this to work usinging a repeater, but at the moment I can't get the radio button checked propety to change from the default value.  I'm using an arraylist as a datasource.  I thought of using a gridview, but I don't know how to add a radio button and a better image control to a cell. 

I've gone round and round with this thing. Each time after a lot of work I find there is something I can;t get working.  Is there a reasonable solution for this? 

I'm back to wanting to build a table, but how do I handle the buttons?

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

Multiple Event Receivers For Single List



I've developed a custom event receiver that fires of the ItemUpdated event for a list. While this code works fine in our dev environment, it appears to not function correctly in production. I have been told that there's another event receiver that also fires on the ItemUpdated event for the same list.

 From the behavior I have seen, it would appear the the two event receivers are "colliding" with one other. Is there anything that I can do to work around this problem? Is there a way to specify an order that the receivers are fired or some other way to prevent them from stepping on each other?

Multiple commands on the codebehind after button_click event to insert and read inserted.


I want to be able to show the record that was just inserted after add_button_click event. I run the insert from mycommand and then set mycommand2 to run the read to populate a details view.

I have a feeling I am going about this the wrong way.

The insert fires correctly but the details view does not populate.

 Dim connectionString As String = ConfigurationManager.ConnectionStrings("ApplicationServices").ConnectionString
        Dim insertSql As String = "INSERT INTO Customers(CompanyName, CompanyAddress1, CompanyAddress2, CompanyCity, CompanyCounty, CompanyZip, CompanyState, CompanyPhone, CompanyFax, CompanyWebsite, CompanyEmail, CompanyContactFirst, CompanyContactLast, CompanyActive, CompanyID, CreatorID, CreatorCompanyID, PrivateCustomer)VALUES(@CompanyName, @CompanyAddress1, @CompanyAddress2, @CompanyCity, @CompanyCounty, @CompanyZip, @CompanyState, @CompanyPhone, @CompanyFax, @CompanyWebsite, @CompanyEmail, @CompanyContactFirst, @CompanyContactLast, @CompanyActive, @CompanyID, @CreatorID, @CreatorCompanyID, @PrivateCustomer)"
        Dim insertNewSql As String = "IF NOT EXISTS(SELECT * FROM Customers WHERE CompanyName=@CompanyName) INSERT INTO Customers(CompanyName, CompanyAddress1, CompanyAddress2, CompanyCity, CompanyZip, CompanyState, CompanyPhone, CompanyFax, CompanyWebsite, CompanyEmail, 

Event Handler (send mail task) firing multiple times for each dataflow error - How can I stop the da


I've set up an OnError event handler for my package which sends an email containing the name of the file that fails import through my dataflow task. The problem is the dataflow experiences three errors (one for each task it is attempting to complete) which in turn causes three duplicate emails to be sent.

I'd prefer to stop the dataflow task completely rather than allow it to try to complete the remaining tasks after the first error. Is this possible? Alternately, how can I set up my event handler to only send one email regardless of the number of dataflow errors that occur?

Thanks in advance!

Retrieving multiple AD users with a button event click in InfoPath 2007


I’m developing an InfoPath 2007 form and need to give the current User the ability perform an AD search which will retrieve all AD entries with the same last name. I have successfully programmed the button event with the below code to retrieve a single AD user (first AD entry) using the DirectorySearch.FindOne method but have not been able to figure out how to get the DirectorySearch.FindAll method to work.

Does someone know how to tweak the below code to work for the FindAll method? Or, is the FindAll method the correct search method to use obtain the results I need?  



   Dim xnMyForm As XPathNavigator = Me.CreateNavigator()

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

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.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.
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