我希望能夠使用SSIS發送電子郵件。我遵循「How to send the records from a table in an e-mail body using SSIS package?」的指示。在運行包SSIS ForEach變量映射錯誤
Error: ForEach Variable Mapping number 1 to variable "User::XY" cannot be applied
:不過,我得到一個錯誤。我的源表有5列(bigint
,datetime
, nvarchar
, nvarchar
, nvarchar
類型)。
另一個錯誤是:
Error: The type of the value being assigned to variable "User::XY" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object.
還有什麼問題呢?
更新:當我試圖找出這個問題,我已經做到了這一點:雖然從Execute SQL Task
獲取數據,我的int
數據轉換爲varchar
,然後使用該變量String
數據類型和它的工作原理。但是,我應該如何設置變量,使其具有INT
數據類型,而不是varchar
?
看來我需要將該變量設置爲Int而不是字符串。所以我確實將DataType更改爲「Int32」,但這可能是錯誤的方式。 – DNac