MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
239 stars 161 forks source link

Variable scope is limited or not available #1094

Open thazanm opened 5 years ago

thazanm commented 5 years ago

Lesson 2-3: Modify the Flat File connection manager

Configure the Flat File connection manager to use a variable

  1. In the Expression Builder dialog, expand the Variables node.
  2. Drag the variable User::varFileName into the Expression box.

The variable declared/created in [Foreach File in Folder] Variable mapping -> User::varFileName is not visible in (In the Connection Managers pane, right-click Sample Flat File Source Data, and select Properties.) Flat File Connection Manager.

welcome[bot] commented 5 years ago

Thank you for creating the issue! One of our team members will get back to you shortly with additional information.

supernova-eng commented 5 years ago

@thazanm - can you please comment what specific article has the error you have outlined?

thazanm commented 5 years ago

This is under SSIS How to Create an ETL Package

Lesson 2 : Add looping. Lesson 2-2: Add and configure the Foreach Loop container

After this step:

Map the enumerator to a user-defined variable Select Variable Mappings. On the Variable Mappings page, in the Variable column, select the empty cell and select . In the Add Variable dialog box, for Name enter varFileName. Variable names are case-sensitive. Select OK. Select OK again to exit the Foreach Loop Editor dialog.

In this step:

Lesson 2-3: Modify the Flat File connection manager Configure the Flat File connection manager to use a variable In the Connection Managers pane, right-click Sample Flat File Source Data, and select Properties. In the Properties window, for Expressions, select the empty cell, and then select the ellipsis button (...). In the Property Expressions Editor dialog, in the Property column, select ConnectionString. In the Expression column, select the ellipsis button (...) to open the Expression Builder dialog box. In the Expression Builder dialog, expand the Variables node. Drag the variable User::varFileName into the Expression box.

Here the variable User::varFileName is not at all displayed. The variable is not visible or available to drag.

In a simple word: "The variable declared in the 'FOR EACH LOOP' is not visible in the 'FLAT FILE CONNECTIONS MANAGER'S expression for connection string'

I am using visual studio 2017 with latest data tool.

thazanm commented 5 years ago

@thazanm - can you please comment what specific article has the error you have outlined?

I have provided more detailed steps.

iCyberMike commented 5 years ago

This issue is in the tutorial document: https://docs.microsoft.com/en-us/sql/integration-services/lesson-2-2-adding-and-configuring-the-foreach-loop-container?view=sql-server-2017

Microsoft Visual Studio Community 2017 Version 15.9.7 VisualStudio.15.Release/15.9.7+28307.423 Microsoft .NET Framework Version 4.7.02556

Installed Version: Community

Microsoft Visual Studio Tools for Applications 2017 00369-60000-00001-AA718 Microsoft Visual Studio Tools for Applications 2017

Visual C++ 2017 00369-60000-00001-AA718 Microsoft Visual C++ 2017

SQL Server Analysis Services 15.0.900.163 Microsoft SQL Server Analysis Services Designer Version 15.0.900.163

SQL Server Data Tools 15.1.61901.24070 Microsoft SQL Server Data Tools

SQL Server Integration Services
Microsoft SQL Server Integration Services Designer Version 15.0.1100.123

SQL Server Reporting Services 15.0.900.163 Microsoft SQL Server Reporting Services Designers Version 15.0.900.163

image

user186 commented 4 years ago

Similar or related issues, see attached image

Properties panel is missing everything mentioned in the tutorial, plus right clicking the connection got no options as mentioned in the tutorial, cannot proceed any further.

It's VS2017 (SSDT)

ssis-problem

bestmbaman commented 4 years ago

Hi I experience the same issue on VS2017, any updates on this issue? Capture

Dalboz commented 4 years ago

image

The issue keeps replicating on

image

stampcoin commented 4 years ago

I got the same issue when i try this tutorial of SSIS. What i did to solve my problem is "Convert to Package Connection", even i checked the value of "PackagePath" indeed starts with "\Package.Connections". So, try to re-convert the package connection.

image

natasadkov commented 1 year ago

Thank you @stampcoin it helps!