.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

Passing Rowdelimiter and Columndelimiter as a variable

Posted By:      Posted Date: September 12, 2010    Points: 0   Category :Sql Server
I have a SSIS package in which I am using Flat file destination. I need to pass the Column Delimiter and Row Delimiter using variable. I have used a variable for the RowDelimiter property of Flat File Connection Manager using SSIS expression. But I dont know why it is not picking up the value from the variable. It is alway picking up the value which is defined in the Flat File Connection Manager editor and not from the variables. For the Column Delimiter I am not even able to find a place to set the value for this. Is it due to bug or I am missing something over here ? Any help would be highly appreciated. Thanks!!

View Complete Post

More Related Resource Links

Authorize.Net ARB passing variable


The following code is Authorize.Net Sample Code provided on their website for ARB clients/merchants to use as an example.  

If you notice, there is a sample (fake) credit card number, (4111111111111111), on Program.vb at "Private Sub PopulateSubscription(ByVal request As ARBCreateSubscriptionRequest).   NOTE: there are four "Sub PopulateSubscription" on Program.vb.  I am refering to the "ARBCreateSubscriptionRequest".

My objective - Pass a variable in a TextBox on Default.aspx to replace the credit card number (4111111111111111) in Sub-PopulateSubscription. 

I assume this can be done, but I am not experienced enough to make it work properly. 

Let me be clear....I don't expect anyone to show me how to code a program to communicate with Authorize.Net, because from reading other posts, many people don't want to offer any help regarding Authorize.Net because they haven't worked with it before.  What I am asking, is for someone to show me how to Pass a variable from a Form to a Class, in a way that will work given the Sample code I have provided. 

I hope someone can help.  Should be just a walk in the park for some of you.

------------------THIS IS Program.vb-------------------------
'D I S C L A I M E

Passing Table Variable to Stored Procedure

My stored procedure expects a uniqueidentifier as a parameter.  However, this unique identifier is stored in a table variable, which looks like this:DECLARE @TableGiftGuid table ( GiftGuid uniqueidentifier )When I try to execute a stored procedure by passing the GiftGuid like so:EXEC my_procedure (SELECT GiftGuid FROM @TableGiftGuid) I get an error. What I ended up doing is declaring another variable, storing the GiftGuid into it and then passing the variable to the stored procedure like this: DECLARE @TableGiftGuid table ( GiftGuid uniqueidentifier ) DECLARE @GiftGuid uniqueidentifieDECLARE @TableGiftGuid table ( GiftGuid uniqueidentifier ) DECLARE @GiftGuid uniqueidentifier SET @GiftGuid = (SELECT GiftGuid FROM @TableGiftGuid) EXEC my_procedure @GiftGuidThat works, but is there a more elegant way of doing this?

Setting a session variable OR passing along information in Javascript

Hello, Form1 needs to send information to Form 2. Form2  opens in it's own window and is sized smaller. I need to send information to Form2 in order to set parameters in the query in Form2. At first I was just going to use an asp button control and load up some session variables, then I remembered that in order to have the next screen (Form2) open in its own window and be able to size it, I had to use an input type="Button" and use Javascript to open the new window like this:<script type="text/javascript"> function open_win() { window.open("/Accounts/Form2.aspx","_blank","toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=1000, height=500"); } </script> But by doing this, I don't know how to pass the information along I need for Form2. How can I pass variable information to Form2?  The data comes from two textboxes on Form1: txtStartDate and txtEndDate. Thank you. 

Passing variable into function in SQL Server from Access



I am trying to call a function in SQL Server 2005 from Access 2003.  It works fine with the constant value, but fails with a variable of the same value.  This works:

strSQL = "SELECT * FROM functionName (constantValue)"
rs.Open strSQL, cn 

But when I use variable in the parameter, I get error.  I have tried creating parameter objects in Access, but couldn't execute it and don't know if this is a way to go anyway.

Would appreciate for any help or suggestion.


Thank you

SSIS Parent/Child Package variable passing



I have having trouble getting my hands around how to retrieve variables from a parent package.  I read about the Environment variables and Configuration File at the parent package level and the Parent Package variable at the child level.

Here are my questions:

1.  Can you only store/retrieve 1 variable in a config file at a time?

2.  Does the child package have to define the variables and if so, do they have to be the same names as the parent package?

This seems so more more complex then the DTS2000 way of passing variables to and from packages.

Any help would be appreciated.

Thanks in advance,

Gordon Radley



question on passing variable to Ajax Extender Toolkit Slideshow


I need to create a slideshow that displays all the images in a folder that have filenames that match a specific criteria.  The criteria is based on a querystring.  Is there a way to get a the querystring into the slideshow's webservice?  If not, does anyone have any suggestions?  I've been looking and looking but everything I've seen has one or more things that I need that it can't do.

Passing a window.location as a (global?) variable




I have come up with form which pulls membership id, allows checkbox selections and commentry (custom feedback). The final piece that needs to be captured is the iframe's url. Now the content in the iframe is content produced by (madcap) flare.


I need to capture the window.location of the iframe url and pass that onto the asp.net masterpage. The iframe is also located in a content page. The iframes content is controlled by it's own TOC. I have added a script to this output so that each time the content (page) in the iframe changes the script alert's me of the new URL of the page just clicked/opened (this is the information I need passed as a variable).


Here is the code producing the desired alert output (page url).


<script type="text/javascript">
var locationObj = window.location;

The above produces the output I would like to capture (but instead of an alert output, I require this as a string) which will allow the insertion into my form as the final piece of information required.


I am not sure how I can convert or catch the output. Of course I would not want to use the alert function everytime the page changes, but wou

Passing xml in javasript variable to server side



I am creating the new XML in javascript and assigning it to javascript variable and assigning it to html hidden field. But in server side I am not able to retrive its value when I debug hidden field shows [object object] in server side.

How can I solve the above mentioned problem? Is there any other better method exist?



Passing a variable in @attachment parameter of sp_send_dbmail..




@sql varchar(100)



@TodayDate as varchar(40

Problem passing local variable for Approvers email in customised Approval workflow


I am building an Approval workflow using SPD and have used the Start an Approval Workflow task action.

The workflow works on a change register and looks up different list of approvers assigned to change items.

Using Local Variables, the look up assignment works fine.

My problem is that when I pass the Approvers variable to the email at the end of the workflow (the on Current Item with... part) it appears the variable in empty?

I have used the approach of adding a variable check in the content of the emails - as the workflow sends the emails anyway. The lookup works fine - it’s just the email at the end of the process that does not seem to be able to see the contents of the variables that are shown to be set earlier.

RowDelimiter property for FlatFile Connection not mapping to a variable correctly


I've ran into the following problem:

I have flat files originating from different systems (MS-DOS, AIX and Windows). Therefore the files have different line endings (CR, LF and CRLF respectively).
I'm using a Script Task inside a ForEach enumerator to find a row delimiter for each file and put the value into a string variable. Then I use Data Flow task to import the data from the flat file into the database. The script task runs fine and sets the variable value to {CR}, {LF} or {CR}{LF} for each file. Columns are delimited with "!" character.

When I map the RowDelimiter property of the FlatFile Connection Manager to the variable using Expressions the subsequent Data Flow task doesn't import the data correctly. I've tried using Format=Delimited and Format=RaggedRight (I removed the last column delimiter), both ways fail to import the data correctly.
Although the mapping of the ConnectionString property to a variable (ForEach populates this variable with the path of the file) works perfectly.

I've even tried setting up all combinations of quotes and brackets on the string variable value ("{CR}", '{CR}', {CR}, CR) ...

The platform  I'm working on is Windows Server 2008 x64 and SQL Server 2008 x64 ...

My current workaround idea is to write a Script Task that would replace all

SSRS 2005 passing Globals!PageNo as a variable into SubReport


I have a sub report which we are using as a generic header for all our reports and one of the requirements is it must have the current page / total pages displayed.

I know the Globals variable for page number and page count are only usable in the header or footer of a page but doing it this way isnt an option for me sadly.

Is there a workaround to this so that I can pass this value to a subreport as a parameter?


Passing a System::Object^ from a returned variable


I have a singleton class thet has a function A^ A::Instance();

I'm trying to pass this to an EventHandler as an object and I get the folowing error

Error 4 error C2664: 'System::EventHandler::Invoke' : cannot convert parameter 1 from 'A^(__clrcall *)(void)' to 'System::Object ^'

for  example I have an event

public event EventHandler TestEvent

and then I'm trying to call TestEvent(A::Instance, nullptr);




Passing a SSIS Variable with a string datatype to a Stored Procedure requiring a uniqueidentifier


I have a SSIS package that uses a SQL Server stored procedure as a data source. The parameter in the stored procedure is pulling data from a column with a uniqueidentifer (guid) data type. I created a package level variable in SSIS with a string datatype. SSIS variables do not offer a uniqueidentifier datatype.

I have the following text in the SQL Command text box:

exec dbo.spBillingReferenceSource
@BatchID = ? 

When I click the parameters button the mappings are @BatchID for the parameter (which is the exact name of the parameter in the stored procedure) and User::BatchID (the SSIS variable) 

When I run the stored procedure in preview mode in the SSIS dataflow, it returns an error message -- "No value given for one or more of the required parameters"

If I run the stored procedure by typing the value in the datasource box such as listed below, it works and delivers the proper records. I have even modified the stored procedure to convert the column to use varchar(36). However, it still returns the same error message. Does anyone have any suggestions on how I can get this to work. Thank you.


Local variable scoping in C#

In my previous post, Compiler-generated scopes for local variable declarations, I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their local scopes.

Compiler-generated scopes for local variable declarations

I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug.

Retrieving a variable from a previous page



I'm looking to have a search page where a user will select an item from a listview, then then taken to another page that wil display data based on their original selection.

A user will type in a string and be presented with a list of usernames that are like that string, when they select a user name who's profile they would like to view I would like the page that they're taken to, to be that users profile.

How would I transfer the variable from the search page to the profile page, and when I work on the profile page, how can I access that variable?


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