.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

OLED DB data source not seeing variable with scope of containing sequence container

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :
I'm using SQL Server 2008 R2. I have a sequence container in which an execute SQL task assigns a value to a variable, the last task in the sequence container is a data flow task with a single OLEDB source (SQL Server 2000) and destination. The source in the data flow uses the variable which has the scope of sequence container, however when the query in the data flow task source is executed, its as if its seeing a null value for the variable, can someone please advise as to what I'm doing wrong here. 

View Complete Post

More Related Resource Links

How To Map A GUID Variable And Use It In An OLE DB Source Data Flow Select Query


I have a simple SSIS package that does the following. 

On the control flow tab, there is an Execute SQL task that calls a stored procedure and returns a GUID. 

I have a package scoped variable that stores a UNIQUEIDENTIFIER output from the stored procedure. It appears that the package variable data type does not include a GUID data type so I tried to use string instead.

Next, the Execute SQL task is mapped to a data flow task. 
Within that data flow task I have an OLE DB Source which connects to a SQL Server Destination task.

On the OLE DB Source Editor screen I have a query that performs the following:

SELECT ID, SessionKey, ....
FROM dba_DroppedLoginsLog
WHERE SessionKey = ?

I have clicked on the parameters button to map the Parameter to my variable called User::SessionKey. This is the output variable from my Execute SQL Task component on the Control Flow tab. This value should be a GUID, but again, I don't see a data type for that.

When I execute the package it fails on the OLE DB Source with the following error:
[OLE DB Source [1908]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE D

Data transformation: Sharing object/variable scope between form and dialog (VS2010/VB)


I am writing a class to provide data transformation between two databases with different schema, and have a windows form which tries to do the data translation work, and a modal showDialog which pops up to halt and tweak the process when errors are detected.

The dialog needs to share, tweak, and pass control information to the main form to tweak the transform parameters until everything works OK.  My question is how to best achieve the data sharing since the dialog has separate data scope.  I have been using declarations like the folllowing to successfuly share data and avoid creating public variables:

     Friend importStatusMessage as string

But with all the variables the dialog needs to tweak, it's becoming messy.  Is there any way to declare the entire dialog as 'Friend' so that main form data is in scope to the dialog?  Or, maybe create an object with properties to pass the data, and share only the object?



SQL Select With Variable Table - Using with ODBC Data Source


Hello all,

Having difficulty with an idea for a SQL query today.  I am working with a data set that points to an ODBC data source.  The data source has several TRANSACTIONmmyyyy tables (mm - month, yyyy - year ), each holding data for a particular month, going back several years. Each table has identical fields and data types.

If I were to run the query below for just one month ( say I took out mmyyyy and plugged in a month and year, 052010 ) it will pull totals for the AccountNum I specify.


mmyyyy.AcctNum, SUM
mmyyyy.Amount ) As
 "Current Month"

TRANSACTION mmyyyy.Region = TOTALS.Region AND
TRANSACTION mmyyyy.Region

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

How to retrieve data from SqlDataSource and pass to a variable?


Hi there,

I have a page in my website where there is very little code-behind. I only have two lines of code in Page_Load() and the rest of the code is declarative ASP.NET code. I have a FormView control which uses a SqlDataSource to get some order information. The SqlDataSource calls a stored procedure called usp_GetOrderDetails, here's the code for the SqlDataSource:

    <asp:SqlDataSource ID="sdsFormOrderDetails" runat="server" 
ConnectionString="<%$ ConnectionStrings:ForexDB %>"
ProviderName="<%$ ConnectionStrings:ForexDB.ProviderName %>"
SelectCommand="usp_GetOrderDetails" SelectCommandType="StoredProcedure"
UpdateCommand="usp_UpdateOrder" UpdateCommandType="StoredProcedure"
<asp:ControlParameter Name="orderId" ControlID="grdOrders" PropertyName="SelectedDataKey.Value" />
<asp:ControlParameter Name="orderId" ControlID="frmOrderDetails" PropertyName="SelectedValue" />

Toolbox: Data Snapshots, Subversion, Source Code Organization and More


If you want to save, organize, and annotate snapshots of your database data, find an easy way to install and configure Subversion, and automate the organization of your source code, then you'll want to read more about these latest tools.

Scott Mitchell

MSDN Magazine August 2009

Data Points: Data Source Controls in ASP.NET 2.0


ASP. NET 2. 0 introduces a series of new tools that improve data access including several data source and data bound controls. The new assortment of data source controls can eliminate a ton of repetitive code that was required in ASP.

John Papa

MSDN Magazine January 2005

Empty Website Data Source windown


Hi all,

I am Visual Web Developer user and facing a problem when I am creating a local report (.rdlc) file.

I am using Business objects as the Data Source for this report. It was working perfectly until all the items in the Website Data Source window suddenly "disappeared". The "Add New Data Source" button on this window is also disabled. Now the window is just like a blank box only. And I can't continue working with the report file like this...

I have tried undoing what I did before but it does not help at all...

Any reason for this to happen? There is no sign or something at least indicating what is wrong.

Please help.


 ps: found a similar thread in this forum but not solved

The report cannot be opened because the data source associated with it is not a report model.


i tried to open a report i created in sql business intelligence development studio in the report builder in wss3 and it gave me this error:

Microsoft.ReportingServices.ReportBuilder.ReportModel.Report: The report 'http://servername:port#/Reports/report.rdl' cannot be opened because the data source 'http://servername:port#/DataSource Library/datasource.rsds' associated with it is not a report model.

This report was not created in Report Builder. Try opening this report in Report Designer instead.

can i fix this so i can open my reports in report builder?


BDC Entity as a Data Source for a Lookup column

Is it possible to create a custom lookup field type to have a BDC entity as the data source?

GridView editing without using data source controls?


I am binding my gridview without using a datasource control and instead doing it in the code behind. However, I would like to use the inline editing features of the gridview. Could someone please point me to an example that does gridview editing/updating 'manually' in the code behind?


Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010 to read and write data to the AdventureWorks sample database.

Sample: Creating a SharePoint 2010 Web Part That Can Read and Write Data to an External Data Source

Explore the code in this visual how-to article as you learn to use Visual Studio 2010 to create a Visual Web Part that uses a BCS external content type in SharePoint Server 2010.

XML Source (Data is not loading to Destination ,Package Runs sucessful)

Hi First I run execute SQL Task SELECT TOP(10) [Message],opportunity_Id  FROM SBP FOR XML PATH ('GS_Opportunity'), ROOT('GSOpportunities') That will make 10 different file into single file then i have assigned this output to variable and it will output as XML Now I put Data flow task ,in it I put XML task and in source i have put XML Data From Variable and I select XSD file location,now XML task is showing me different source table and i have selected appropriate destination table but when i run this package it will not transform data from source to destination,Can you suggest me what is the problem i try to put data viewer it is not transforming any data  while insted of if i select direct file location instead of variable it is running good    

MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source D

Hello, On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink. A data source has not been supplied for the data source DS_TraceEvents SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX) 1. exec sp_executesql N'SELECT dtb.name AS [Name] FROM master.sys.databases AS dtb WHERE (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX' this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server). 2. USE [datatbaseX] this produces the following error: Msg 911, Level 16, State 1, Line 1 Database 'databaseX' does not exist. Make sure that the name is entered correctly. why is the report looking for the database on my server? thanks Jag Environment: MDW (Management Data Warehouse) on SQL 2008 R2  

VS 2010 and data source issues

I've been banging my head against the wall for the past 4 hours on this one and think I'm going to need a little help here. I must be missing something. I'm in VS 2010 on Windows 7. I've got a web project which has been going fine, but no matter what I do I can't get a data source to show up in the Data Source window. I've added a data source using Data > Add New Data Source, and the "wizard" appeared to complete successfully. I have a data source showing in my solution explorer, and if I open the .xsd file I see all my tables from a remote SQL 2005 database. I have a good data connection to the database server showing up in the Server Explorer window. But no matter what I do I cannot get anything to appear in the Data Sources window, which is greyed out (the commands at the top are grayed out and there's gray text in the middle of the window reading "There are no data sources to show for the selected project"). Under the main Data menu at the top of VS, the "Show Data Sources" and "Add New Data Source" commands are missing. I can sometimes get them to reappear if I restart Visual Studio or reboot the OS, but not consistently. I've been all over Google on this and have tried every suggested solution I can find, to no avail. Anybody have any ideas? Thanks.

Data Source View Gives incorrect Error--Different Data Type

Hi, I'm creating a report model (2008 R2).  I am trying to create a relationship between two tables.  One FKs to another--same name and type (tinyint) columns.  But the Data Source View editor doesn't allow this, giving the message "...source and destination column have different data types".  But the columns are the same types.  I ahd this once before  acouple of years ago and don't remember how I got around it. Does anyong have ideas?  
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