[thelist] ASP/VBScript: Long text fields from database into recordset/array are truncated
Wade Armstrong
wade_lists at runstrong.com
Thu Mar 6 11:22:01 CST 2003
on 3/6/03 9:20 AM, Fred Schenk at evolt at FredSchenk.com wrote:
> I have a problem with some long text fields (multiple fields which I'm
> concatenating at the database side into one result field). The result is
> truncated at a length of about 256. How can I tell ADODB or VBScript or
> Access (yes, it's that bad ;-) not to truncate my results? TIA.
The result would be truncated at exactly 255 characters if the datatype for
the field is Text, which has a maximum length of 255 characters (or less if
you set it to be less). Try using a Memo datatype instead.
If you're using a Memo datatype, and you're querying for the data in the
table, to get the data out of the Memo field you'll need to:
- Ir you're directly referencing recordset values, make sure that the memo
field is the last field referenced in your SELECT statement, eg. "SELECT
field1, field2, field3, memofield FROM table WHERE somevalue =
someothervalue"
or
- use GetRows (see http://www.4guysfromrolla.com)
Wade
More information about the thelist
mailing list