Blog Post

Varchar(Max) and ADO

,

Another note from a friend. They decided to upgrade a large varchar column to varchar(max) and subsequently found strange behavior in things that used to work. It would only render to an web page if they did an explicit cast to varchar(some size) and without that if you tested the length it would return zero.

So the question was, it is a db issue or not? Didn't strike me as one, but they had just done the alter so it was a fair question (if not likely), but because I knew a little about their environment my question was if they were using ADO. That was enough of a clue for them to look in the right place and find this article that says you have to add some stuff to the connection string to get it to work (or upgrade to ADO.Net!).

ADO a lot less prominent than it used to be, but far from dead. Makes you wonder why it's not enough to upgrade the MDAC rather than force you into a recompile. Perhaps not the same technically, but in principal varchar(max) = text, so it doesn't seem like it would have broken something to make it understand the new data type.

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating