Variable problem, Error: The type of the value being assigned to variable
Error: The type of the value being assigned to variable "User::rsNumOfPages" differs from the current variable type. Variables may not change type during execution. Variable types are strict, except for variables of type Object. My original field comes from Oracle 10g database and is of NUMBER type Number(5). In my select statement i used CAST(fieldname as NUMBER(5,0))...looking at the output properties, it converted to DT_NUMERIC. In properties...Advanced Editor INPUT/OUTPUT Ive tried various variable types...but no success. The variable - User::rsNumOfPages is datatype "Double". Also verified that the column from my tables does not return null values.
August 17th, 2012 12:59pm

Is the variable used in an expression? There could be culprit.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2012 2:09pm

Yes, I am using the variable User::rsNumOfPages in my ForLoop container EvalExpression - @[iStartValue] <=@[rsNumOfPages]
August 17th, 2012 3:03pm

What is the initial value of the variable? And does the expression evaluates?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2012 3:04pm

It's 0 (zero) but should get it's value from the object variable rsDetails.
August 17th, 2012 3:07pm

Still unclear what is going on where. You at some point do try to assign a value of incorrect type to User::rsNumOfPages I noticed it is rsNumOfPages, but it is DT_NUMERIC (btw, should be say T_I4 - integer). rsDetails, needs to be shredded to extract multiple values off it and then feed User::rsNumOfPages. My guess, this is where the error is.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2012 3:08pm

Still unclear what is going on where. You at some point do try to assign a value of incorrect type to User::rsNumOfPages I noticed it is rsNumOfPages, but it is DT_NUMERIC (btw, should be say T_I4 - integer). rsDetails, needs to be shredded to extract multiple values off it and then feed User::rsNumOfPages. My guess, this is where the error is.Arthur My Blog
August 17th, 2012 3:12pm

Thanks Arthur, I will look at it a bit more.
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2012 4:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics