Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Integration Services
»
For Loop Expression - Casting Error
For Loop Expression - Casting Error
Rate Topic
Display Mode
Topic Options
Author
Message
robshobs
robshobs
Posted Wednesday, September 19, 2012 10:40 PM
SSC Rookie
Group: General Forum Members
Last Login: Monday, May 13, 2013 11:23 AM
Points: 41,
Visits: 268
I am trying to program a For Loop container and cannot get the For Loop Properties expressions set. I have simplified the expression to the following:
@Test_Date=(DT_DBTIMESTAMP)@Max_Load_Date
I get the following error messages:
Error at For Loop Container: Error code 0x80020005 occured attempting to convert from data type DT_WSTR to data type DT_DBTIMESTAMP.
Error at For Loop Container: Casting Expression "@Max_Load_Date" from data type "DT_WSTR" to data type "DT_DBTIMESTAMP" failed with error code 0XC00470C2.
AND I FOUND THE FIX WHILE WRITING THIS POST.
I did not populate the variables with a default value. I left them blank. SSIS probably treats it as a blank and not a null. Thus causing the conversion errors. Populated the default values and all is good.
I figured I'd complete the post hoping it'll help someone else.
Rob
Post #1361729
ThomasRushton
ThomasRushton
Posted Thursday, September 20, 2012 12:56 AM
SSC Eights!
Group: General Forum Members
Last Login: Monday, May 20, 2013 8:40 AM
Points: 966,
Visits: 373
AND I FOUND THE FIX WHILE WRITING THIS POST.
[...]
I figured I'd complete the post hoping it'll help someone else.
Good on you, for both parts of that.
Post #1361760
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.