[thelist] ASP RecordSet weirdness
Anthony Baratta
anthony at baratta.com
Thu Apr 1 22:44:45 CST 2004
At 05:19 PM 4/1/2004, Ken Schaefer wrote:
>Anthony has mentioned "a bug" - actually it's not a bug, it's caused by the
>fact that ADO doesn't know how big a text/memo field actually is.
Ken...
That's not exactly what I meant. What've found (and I know a few of the
"old timers" here have seen this too, since it's been discussed here) is
after you requested the data from a text type field, the proceeding data
requests will return blank.
e.g.
Col1 = varchar
Col2 = text
Col3 = varchar
Col4 = int
Then in the code you are throwing data around:
sValueOne = objRS("Col1")
sValueTwo = objRS("Col2")
sValueThree = objRS("Col3")
sValueFour = objRS("Col4")
Even if there is data in the DB, sValueThree and sValueFour will contain no
data. What we've done to get around this is either use GetRows(), or put
the Text field last in the list:
sValueOne = objRS("Col1")
sValueThree = objRS("Col3")
sValueFour = objRS("Col4")
sValueTwo = objRS("Col2")
In the case that started this thread, all the columns are varChar. So
unless Tab is mistaken about the column types, something weird is going on.
---
Anthony Baratta
President
Keyboard Jockeys
"Conformity is the refuge of the unimaginative."
More information about the thelist
mailing list