Ich versuche, einen SQL-Task Execute in SSIS 2008 zu verwenden, um einen Ausgabeparameter für eine Geschäftsprozedur einer Paketvariablen zuzuordnen.SSIS 2008 Ausführen von SQL-Ausgabeparameterzuordnung datetime2 Problem
Die Paketvariable ist SSIS-Typ DateTime und der Speicherprozedurparameter ist SQL-Typ DATETIME.
Die SQL-Anweisung ist EXEC GetCurrentDate @CurrentDate=?
und im Parameter-Mapping-Bildschirm wird der Parameter der Paketvariablen mit der Richtung Ausgabe und dem Datentyp DBTIMESTAMP zugeordnet.
Wenn ich laufe das Paket ich die folgende Fehlermeldung erhalten:
[Execute SQL Task] Error: Executing the query "EXEC GetCurrentDate @CurrentDate=? " failed with the following error: "The type of the value being assigned to variable "User::CurrentDate" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object. ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
Wenn ich eine Spur auf der Abfrage ist Lauf betreibe ich die Art sehen wird als datetime2 angenommen:
declare @p3 datetime2(7)
set @p3=NULL
exec sp_executesql N'EXEC GetCurrentDate @[email protected] ',N'@P1 datetime2(7) OUTPUT',@p3 output
select @p3
Does Wer weiß, warum der Typ Datetime2 ist?
Dank