Classic ASP result set - ultimate confusion!
Posted
by
Paul
on Stack Overflow
See other posts from Stack Overflow
or by Paul
Published on 2011-03-16T16:08:25Z
Indexed on
2011/03/16
16:10 UTC
Read the original article
Hit count: 342
asp
|asp-classic
Consider a simple result set from a mysql query.
rs("description")
and
rs("description").Value
should be considered as the same thing. However, depending on how you access them, you get different results (!!)
Access rs("description") directly and you are returned a "Field" object. Or, more importantly, use it directly in a call, and you are returned a "Field" object.
mydescription = rs("description") + " is the description"
Assign it to another variable, and the Value of that object is assigned...
mydescription = rs("description")
the contents of "mydescription" is a string.
Why this difference? At one point in the life of ASP they must have both worked exactly the same, so why have they changed, and how can I change it back?
© Stack Overflow or respective owner