[thelist] ASP/VBScript: Long text fields from database into r ecordset/array are truncated

Rob Smith rob.smith at THERMON.com
Thu Mar 6 11:25:02 CST 2003


I had the same problem. and it was really messing up my stuff. I changed my
data type to Text 16 and all was well with the universe. (was varChar 8000)

Rob

-----Original Message-----
From: Wade Armstrong [mailto:wade_lists at runstrong.com]
Sent: Thursday, March 06, 2003 11:24 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] ASP/VBScript: Long text fields from database into
recordset/array are truncated


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

--
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !



More information about the thelist mailing list