.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

Cannot make use of the Merge Task correctly

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :Sql Server
Hi All, I'm Testing the Merge Task and here is the situation I have two sources one is an SQL  table CREATE TABLE MyTable ( Identifier INT NOT NULL IDENTITY(1,1), Content NVARCHAR(20) )  the other one is a flat file that has content suitable to that above tabe, For the SQL table I used an OLE DB Source and I specify a sql command to retrieve the data, the sql commad is as follow:  SELECT     Identifier, Content FROM         dbo.MergeTable ORDER BY Identifier, Content As you can see the command sorts the data. In the other side (The flat file) I added a sort transorm that recieves data fom that flat file and I configured that sort task to sort data exactly like the ole db one. Now the problem is when I tie the both inputs to the merge task then this last one still raise the error Error 4 Validation error. Data Flow Task Merge [923]: The input is not sorted. The "input "Merge Input 1" (924)" must be sorted.   DlmCustomer.dtsx 0 0  Inspite of the fact that the ole db source data specifie a command that sort data??? Thank you   The complexity resides in the simplicity

View Complete Post

More Related Resource Links

How to make the Workflow Status remain "In Progress" when a task is "Rejected"


Hi Sir/Mam,

I have a work flow running on a list, when a task is Rejected at a stage then the Workflow status is set to "Completed". Instead of this I want the Status to remain as "In Progress", so that in future after the modification of the document the Approver may Approve it and then take it to the next stages. This is not possible if the Workflow is set to "Completed".

Can you please suggest an easy way to do this

Thanks in Advance


Can't make parameterized query work in data flow task


I have an OLE DB source in a data flow task.  The connection is pointing to a SQL Server 2008 instance.  My SQL works fine when I click the preview button.  Now I need to make it parameterized by adding a question mark in my where clause.  After doing so & clicking the Parameters button, I get the error described in this post .  When I try to do what's described therein to correct the problem (click the "build query" button), I get the error "The PIVOT SQL construct or statement is not supported."

I can't make this query an expression; it's simply too complex to maintain that way (besides, just pasting it into an expression builder window and trying to evaluate as is doesn't work - can't evaluate).

So the question is, how do I parameterize a query?  And why does SQL here work so radically differently from SQL in an execute SQL task?

Is there any Data Flow Task in SSIS to merge 3 different recordsets (from 3 different tables) and se

I have a requirement, that has 3 different Execute SQL Task that returns 3 different recordsets which differ from each other.  I want to know whether these 3 recordsets can be sent as Input to a Script Component.  I know that Script Component accepts only 1 Input... But is there any way, to have this done

Initializing a Merge Subscription Without a Snapshot - doesn't operate correctly



I do the backup from the publisher, next I restore it at the subscriber using *pure* database.

next I attempt to create subscription using this db. of course, I use

SubscriptionSyncType.None for SyncType propery of the subscription.


1. nevertheless the merge agent downloads whole snapshot!

both data (bcp files) and the schema.

2. I get the *strange* error. below thelines from the log:

Applying the snapshot to the Subscriber

A dynamic snapshot will be applied from 'C:\DOCUME~1\...\LOCALS~1\Temp\DB$MAIN_DB1_Main_testReplFromBackup\'

Preparing table '__UserSyncOptions' for merge replication

Applied script '__UserSyncOptions_2.cft'

{call sp_MSsetconflicttable (N'__UserSyncOptions', N'MSmerge_conflict_Main___UserSyncOptions', N'DB\MAIN', N'DB1', N'Main')}

{call sp_MSsetconflicttable (N'__UserSyncOptions', N'MSmerge_conflict_Main___UserSyncOptions', N'DB\MAIN', N'DB1', N'Main')}

Incorrect syntax near 'Id'.

The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When trou

How to write the correctly query to this task?


Hi All.

I have sql table with three columns Cparent_alias ,Custom_alias,C_descript I wont to update the name in C_descript column BUT before I need to check if the name already exist or not.




Custom Task form of a SharePoint Designer workflow is not displaying correctly


We have created a custom workflow using SharePoint Designer. We are using one action “Collect Data from a User”. As you know, this action sends an email to a user with a link to a task form where user is supposed to accept or reject a request. We are encountering following issues with this form:

  1. Form is not a workflow form, it is a task item of the task list that the “Collect Data from a User” action of the workflow creates.
  2. Form opens as an item of the workflow task list in View mode (DispForm.ASPX) instead of Edit mode (EditForm. ASPX)
  3. When user clicks on “Edit Item” button, it displays all the fields of the task as editable – we want only the Approve/Reject option buttons and the comments TextBox (that we created during the workflow design) to be displayed as editable

Can someone please explain what is going on and how can we resolve the above issues?

Merge Multiple Task Lists



I am a sharepoint user with very little technical know how so please bare this in mind if/when responding! :)

I have a sharepoint site that has various meeting workspaces. Within the workspaces there are individual task lists. I need to show all tasks in the task list of the sharepoint site. Is this possible?

Thanks in advance for your help!


Beginner: this doesn't make sense to me


Do you need and "empty" script tag in the head to run scripts that are in the body?  Also, can you run JQuery scripts if they're in the <head> tag?  The first sample only works if the JQuery script is in the form (and body) tag, not in the head - even if I add $(document).ready(function() { });

This works

<head runat="server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" />
<script type="text/javascript">
<form id="form1" runat="server">
<a href="">Here is a link</a>
<script type="text/javascript">
$('a').click(function () {
alert("you clicked me!");


This doesn't work.  Notice I removed the second <script> tag from the head

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="serve

how to make a dropdownlist looks like google search box


dear all...

any idea how to do that ?

Thnx in advance

Need Syntax To Make Results of LINQ Union Return Non-Generic Type



I have the below SQL which works just fine:

SELECT     Message, CreateDate, AccountId, AlertTypeId
FROM       dbo.Alerts
SELECT     TOP (100) PERCENT Status, CreateDate, AccountId,
                          (SELECT     10 AS Expr1) AS AlertTypeId
FROM         dbo.StatusUpdates
WHERE AccountId = PassedInParameter

I have been going about trying to convert the above into a LINQ method and am having problems with return types.
As the above SQL illustrates, I am querying two distinct LINQ tables - Alerts and StatusUpdates -
and then attempting to perform a Union on them. In order to do the union in LINQ, I have to have agreeing types. So, I
am using "var" to make the results of "alerts" and "updates" generic before the union.  

public IList GetStatusUpdatesAsAlertsByAccountId<T>(Int32 accountId)
            using (WorkbookDataContext dc = _conn.GetCont

Unable to make connection to database?


Hy guys. I try to connect my database for so long so i wrote two type of codes. Let's discuse first on.

I have database called PhoneDirectory.

It have only one table named Residents.

I have button wiht ID="Button1".

I want when i click this button to see all of my residents. 

I want to see the result in DetailsView and to be able to edin, delete and add new resident.

First try with SqlDataSource so i wrote this:

<asp:SqlDataSource ID="Resident Details" runat="server" ProviderName="System.Data.SqlClient" ConnectionStrings="<%$ ConnectionStrings:ThisIsTheConnection%>" 
              SelectCommand = "SELECT * FROM Resident "

Category attribute of user control property does not work correctly in categories tab.



I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
set { /* the code for set */; }
get { /* the code for get */; }

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.

how to make a css style background image be linked to an image in the resource file


hey guy, i need help in a very troubling matter. I want to make a textbox with a specific style, within this style a set of images as background parts, how can i attach these images to the custom control as whenever i take the .dll file and add it to the toolbar the images do not appear. So i tried to make them as resource files and their property as embedded in .resx file, so how to make the css style background image url to be linked to any of those image.

thanks in advance

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



Merge SQL to Excel--Need .Net button to open on fly and have current SQL data!


           Hello all,
I do not know if this is the proper place to ask this, but my question is...
I have a SQL DB and I want to convert it to Excel Sheet (I did this using the wizard)!
In my aspx page I have a button.  So when I press this button I want the Excel sheet to open!  But I need the Excel sheet to show me the up to date information that is in the SQL DB.  

Make sure that the class defined in this code file matches the 'inherits' attribute, and that it e


Here is the page directive for the page that throws the error:

@ Page language="c#" Inherits="University.AspNet.Index" CodeFile="Index.aspx.cs" %>

The code behind file Index.aspx.cs starts like this:

using University.Framework.UI;

namespace University.AspNet

public partial class Index : University.Framework.UI.HomePage

The code behind is extending this HomePage class, which is in turn an extenstion of another class University.Framework.UI.Page, which extends the System.Web.UI.Page class.

Am I misusing the I

Parallel Debugging: Debugging Task-Based Parallel Applications in Visual Studio 2010


In Visual C++ 10 and the Microsoft .NET Framework 4, Microsoft is introducing new libraries and runtimes to significantly ease the process of expressing parallelism in your code base, together with new tool support for performance analysis and debugging of parallel applications. In this article, you will learn about debugging support in Visual Studio 2010, much of which is focused on task-based programming models.

Stephen Toub, Daniel Moth

MSDN Magazine September 2009

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