Quantcast
Viewing all articles
Browse latest Browse all 24688

Problem with Parameter in For Loop Container

I am learning SSIS Containers by doing the Tutorial Gateway excercises and have found a problem.

In the For Loop excercise, in the Execute SQL Task editor it requres you to set a parameter for the counter loop.  In the excercise the data type according to the tutorial is int32, but I can't find a data type int in the list.  I tried SHORT and DECIMAL, but they do not work.

Here is the error:

[Execute SQL Task] Error: Executing the query "-- For Loop Container in SSIS Example
INSERT INTO ..." failed with the following error: "An error occurred while extracting the result into a variable of type (DBTYPE_UI2)". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

I'm assuming that it is the parameter not set correctly.

Here is the query I'm using:

-- For Loop Container in SSIS Example
INSERT INTO [dbo].[SSISForLoopExample]
           ([CounterNumber]
           ,[LoopNumber]
           ,[LastUpdated])
     VALUES
           (@CounterNumber
           ,'Loop Number' + CAST(@CounterNumber AS VARCHAR(50))
           ,getdate())
Can someone advise what data type or suggest what else may be wrong?

I am using:

Microsoft SQL Server Data Tools for Visual Studio 2017  (SSDT)
Version 15.9.15
VisualStudio.15.Release/15.9.15+28307.812
Microsoft .NET Framework
Version 4.8.03752

Installed Version: IDE Standard

Microsoft Visual Studio Tools for Applications 2017   00371-40000-00001-AA192
Microsoft Visual Studio Tools for Applications 2017

C# Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Project   1.0
Information about my package

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

SQL Server Analysis Services   15.0.1483.0
Microsoft SQL Server Analysis Services Designer
Version 15.0.1483.0

SQL Server Data Tools   15.1.61906.03120
Microsoft SQL Server Data Tools

SQL Server Integration Services   15.0.1301.433
Microsoft SQL Server Integration Services Designer
Version 15.0.1301.433

SQL Server Reporting Services   15.0.1484.0
Microsoft SQL Server Reporting Services Designers
Version 15.0.1484.0

SsmsVsIntegration   1.0
Information about my package

Visual Basic Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio


TEH


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>