.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

Add parameter to ADO or OLEDB Source without using Expressions?

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :Sql Server

(Using BIDS 2008 R2)

Is there any way to add parameters to a ADO or OLEDB Source without using Expressions? Just like Execute SQL Task (Control flow) and OLE DB Command (Data flow)

I find it very cumbersome to have to go and change the expression. If I add a column, then I also need to go back to the Source query, add and remove a space before it adds the column to the output. Also sometimes I forget that I have an expression and when I save the package the Expression overrides the query I had just updated in the source.

Hope someone can help.



View Complete Post

More Related Resource Links

OLEDB source task + NULL Parameter



we are using SSIS 2005 and Sql server 2005. My stored proc has 3 parameter. 2 date parameters and 1 varchar parameter. The varchar parameter is set to null as default like this:

Alter procedure uspSPName







OLEDB Source Problem?

Hi all, My source is oracle am loading the based on process date. I took one variable. Changed evaluate as expression=true. In expression I wrote below query. My total records 696148.only 695590 are loaded in my staging table. After 30 min also its showing yellow color with same records. I changed my process date. Same thing happened. What is the problem I didn’t find? "select member_number,tran_id,tran_dt,store_no,tran_line_id,tier_id, disc_prog_id,disc_prog_lev_id,sku_no,coupon_amt,total_qty,total_price_amt, earned_amt,stmt_amt,paid_dt,sales_stmt_status_code,process_date, orig_tran_id,stmt_num,discount_amt,master_number,order_channel_cd, category,tran_type  from sales_stmt_detail  where to_char(process_date,'MM/DD/YYYY') =" + "'" + @[User::V_SQLProcessDate] +"'" Thanks cmk..

SSIS And Sybase Source OLEDB connectivity issue with code page for character set

Hi I am using SSIS 2008 to connect the Sybase Server version 15.0.3 64-bit. The default character set id used by this Sybase server is 4 (i.e. roman8). (http://manuals.sybase.com/onlinebooks/group-charc/chg0300e/charsets/@Generic__BookTextView/1706;pt=266) I had installed Sybase Client for Sybase OLEDB Driver (ASEOLEDB) to integrate this in OLEDB Source Editor. As per guidance from one of the past MSDN forum discussion, I tried setting property of AlwaysUseDefaultCodePage property to "FALSE"  (http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/f5af9328-e1fb-48d7-a85d-1d08bb7cf0e5/). However, I am still experiencing error message as follows:- ********************************************************* Error at Package2 [Connection manager "xxxxxx.xxxxxxx"]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available.  Source: "ASEOLEDB"  Hresult: 0x80004005  Description: "[00000] [Native Code: 30061] [ASEOLEDB]Could not load code page for requested charset". An OLE DB record is available.  Source: "ASEOLEDB"  Hresult: 0x80004005  Description: "[1ZZ001] [Native Code: 30016] [ASEOLEDB]Internal Error". Error at Data Flow Task 2 [OLE DB Source [1]]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMC

Refer Rows/values of OLEDB Source inside DFT

I have a Data Flow task that implement Insert/Update using logic:  http://social.msdn.microsoft.com/forums/en-US/sqlintegrationservices/thread/131dbe38-95a9-4b64-8434-60ba3cd6de00/. Now I want to also include "Delete" just after the OLEDB Source where I will delete from Target Table if the Rows are present in Target and No in the OLEDB Source. So what control I should use and how do I refer to the OLEDB Source records. May be something like: Delete from dest_table where ID NOT IN (SELECT ID from OLEDBSourceControlRecords)... Thanks, Prabhat

Duplicate URLs in Source Parameter of Query String for All SharePoint Lists

After performing a database attach method of upgrading our existing web application from MOSS 2007 to SharePoint Server 2010, all of our lists that migrated now exhibit an interesting but undesirable behavior.  The DispForm.aspx and EditForm.aspx pages that get loaded are given the Source parameter of the query string but instead of the URL being a single entry like: Source=http://sharepointsite.domain.com/Pages/Default.aspx It winds up putting the URL twice like this: Source=http://sharepointsite.domain.com/Pages/Default.aspx,http://sharepointsite.domain.com/Pages/Default.aspx Naturally this makes processing of the form -- either by choosing OK or Cancel buttons -- result in an HTTP 404 error.  The question we're left with is how in the world did the Source parameter get set that way to begin with.   It wasn't that way in 2007. We had thought that perhaps there was something that didn't migrate over correctly for the existing lists, so I tried creating a new list and then added a new item to the list.  So far so good.  Then attempted to Edit Properties or Edit Item or even View Item, etc. -- essentially triggering the load of the EditForm.aspx and DispForm.aspx  -- and we received the 404 again.  At this point we're not sure what's going on or how to fix it.  We've performed the migration three times so far with t

oledb provider for db2 and "?" parameter

Ok, i'm working with db2 trow oledb provider(ssrs 2008) When i try the following query in query designe i have the following error: "the number of host variables specified is not equal to the number of parameter markers "   <!-- @page { margin: 2cm } P { margin-bottom: 0.21cm } --> SELECT t.FIMPTOT, (CASE WHEN (t.Pct_To_Total > 0) AND (t.Pct_To_Total < 1) THEN 1 ELSE INTEGER(t .Pct_To_Total) END) Percentage FROM (SELECT FIMPTOT, SUM(NUMRIP) NUMRIP, (double(COUNT(NUMRIP)) * 100 / (SELECT COUNT(NUMRIP) FROM DB2DA.TAB1INDI WHERE FIMPTOT > '0' AND ANNORIFE = ? AND SIGPRO =? AND CODCOM = ? AND CSC BETWEEN ? AND ? ) )Pct_To_Total FROM DB2DA.TAB1INDI WHERE FIMPTOT > '0' AND ANNORIFE = ? AND SIGPRO =? AND CODCOM = ? AND CSC BETWEEN ? AND ? GROUP BY FIMPTOT) t please help me ;-)

OLEDB Source running full MDX query when validating




I have an Integration Services project which creates a flat file report from Analysis Services, I'm using an OLE DB as data source and running an Openquery in the SQL statement.


the problem is that Integration services runs the query twice before getting the data into the flat file. I know this because the query runs two times in Profiler, and because the same query takes half the time when run in Management Studio.


Integration Services is running the whole query when validating. how can I disable this validation or better make it validate properly.



How to make up MDX with parameters of SSIS OLEDB data source

Hi everyone,

I want to make up a MDX query by using some parameters, just like:

{...}ON ROWS
FROM [CubeName]

I put this query in the 'sql command' field of OLEDB data source, and replaced the date parts with parameter token '?':

{...}ON ROWS
FROM [CubeName]

However, when I clicked 'parameter' button, the exception below showed:

Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable. (Microsoft Visual Studio)
Error Code = 0x80040E51, External Code = 0x00000000:. (Microsoft OLE DB Provider for Analysis Services 2008.)


How to create a source component using Oracle oledb connection


How to create a source component using Oracle oledb connection in x64??


Execution SSIS package in .NET: ADO NET Source with Expressions Problem

Hello Gurus!

We try to execute our SSIS packages from a .NET application. It works fine until we use “Expressions ” inside Data Flow’s components like “ADO NET Source” (e.g., for building SQL statements)

I use the ADO NET Source Control and want to set the SqlCommand property with an expression holding a SQL statement.

When executing the SSIS package in Visual Studio (in debug mode) I get no problem, everything works fine. When executing the package from within my .NET application it crashes the app completely, only creating a generic Win32 Exception with no relevant information.

My steps:

1.       I created new SSIS package.

2.       Then added the Data Flow component.

3.       Inside Data Flow I added “ADO NET Source&

How to capture bad records from OLEDB source in SSIS?


Hi All,

My source and destinations are Sqlserver.I need to create nearly 40 packages with different table .Some time we will get bad records from source. How to capture the bad records? If I use redirect option in oledb destination  I need to create for every table one more error table also is it good or not How to handle this situation?





SSAS with Teradata Oledb data source



    I am getting this error while creating a data source view(for creating a cube)  from Teradata.As you can see from the message,I am using Oledb Provider for Teradata.

  'TDOLEDB.1' failed with no error message available, result code: DB_E_ERRORSOCCURRED(0x80040E21). (Microsoft Visual Studio)

Can someone help me, I have searched online for answers but could not find the solution.








I'm getting a wierd error in OLEDB Source saying:

[OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x00040EDA  

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "OLE DB Source" (1) returned error code 0xC0202009.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.

Basically there is a query inside oledb source which connects to sql server 2008 database and gives the results. The total no. of rows retrieved are 3.9 million. This package used to run well from last 1 year, but today after loading 3.8 million its giving this error.

The query runs fine in Management studio and gives complete results. I have tried putting just the oledb source and multicast destination and still it fails after getting 3.8 milion records.


Document Libraries and the query string source parameter



In MOSS 2007 / WSS 3.0 I used to be able to pass a &Source= parameter to the upload page of a document library and it would get carried through to the Document Properties page.  When the user checked-in the document, the user was taken back to the page specified in the Source parameter.

In 2010, the source parameter appears to get cleared and reset between the Upload page and the Edit Properties page - defaulting to the allitems.aspx view.

Has anyone used this technique in SharePoint 2010 and if not can anyone suggest any work arounds for taking a user to a specified location after the document upload process has been completed?

Thank you for any help you can provide.

Kind regards


Blog: http://ghamson.wordpress.com

Twitter: @ghamson

the parameter in slice source cube of MS2008R2


I create a Data Mining structure, and use the cube slice to slice the hierarchy of the dimension, I define a filter, for example,

organization as the dimension, store as the hierarchy, equal as the operator, {Shanghai} as the filter expression, then following a check box as the parameter

I want to know what's the meaning of the parameter here, how can I use it, please describe it in detail, thanks.

Data Flow Source.... Expressions/Variable

I am using the SSIS data source reader to connect to a MySQL database.

Am I able to use expressions with this Data Flow Source. I need to pass a variable to the SQL code?

I am using SQL 2005.

Mr Shaw

Linq: how to share parameters between lambda expressions ?

When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it's not so easy because each Linq method is not calling the following one. In a Linq sequence, each method is using the result computed by the previous one. So, local contexts are not visible from one method to another.
The compiler is using two technical different ways to let parameters go out of a method.
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