k_rasuri
asked on
"Invalid Time Format" Stored Procedure in SSIS
Hi all,
thanks for visiting my thread. I have EXEC sp_loaddata ?,? statement in my execute sql task. I am using the parameter mapping to provide the variables.
variables: datatype value
StartDate datetime 2008-09-10 19:00:00
EndDate datetime 2008-09-10 20:00:00
Paramenter Mapping: direction datatype ParameterName ParameterSize
User::StartDate Input DBTIMESTAMP 0 -1
User::EndDate Input DBTIMESTAMP 1 -1
Im using DBTIMESTAMP because i didnt find DATETIME in the drop down list. (any ideas why datetime is not included??)
when i removed the paramenter mapping and directly execute the stored procedure..it is working fine
EXEC sp_loaddata '2008-09-10 19:00:00', '2008-09-10 20:00:00'
when i include the paramenters im getting the error "Invalid time format" . possible failure reasons: problems with the query, "ResultSet" property not set correctly, paramenters not set correctly, or connection not established correctly
what could be the problem?? thanks
thanks for visiting my thread. I have EXEC sp_loaddata ?,? statement in my execute sql task. I am using the parameter mapping to provide the variables.
variables: datatype value
StartDate datetime 2008-09-10 19:00:00
EndDate datetime 2008-09-10 20:00:00
Paramenter Mapping: direction datatype ParameterName ParameterSize
User::StartDate Input DBTIMESTAMP 0 -1
User::EndDate Input DBTIMESTAMP 1 -1
Im using DBTIMESTAMP because i didnt find DATETIME in the drop down list. (any ideas why datetime is not included??)
when i removed the paramenter mapping and directly execute the stored procedure..it is working fine
EXEC sp_loaddata '2008-09-10 19:00:00', '2008-09-10 20:00:00'
when i include the paramenters im getting the error "Invalid time format" . possible failure reasons: problems with the query, "ResultSet" property not set correctly, paramenters not set correctly, or connection not established correctly
what could be the problem?? thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks pedro for the reply and attachments..but DATE will return only the date part right..not the time. In my case i want both date and time. When i set the mapping to DBTIMESTAMP some how its is not mapping properly and what...im getting the error 'invalid time format'
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You have the DATE format! Check attached image
Regards!
Pedro
www.pedrocgd.blogspot.com
SQLTask2.JPG
SQLTask1.JPG