p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

ultradev thread: Problems retrieving info from SQL Server 7 'Text' fields

Message #1 by boak@b... on Wed, 4 Apr 2001 11:35:54
Not sure what kind of query you are using, but make sure that the text 
field is selected last in the query:

SELECT field1, field2, charDesc FROM myTable WHERE bla bla bla

In this case, only charDesc is of type text and selected last in the query.

If you have more text fields in one query, query them in the order you are 
using them:

SELECT ID, Category, charDesc1, charDesc2 FROM myTable WHERE bla bla bla
etc etc

This also means you can't use SELECT * (which is bad practice anyway)

You might want to check the following article:


Hope this helps,


> On a couple of occasions I've had difficulty extracting data from 'text' 
> datatype fields holding data expressed as '<long text>' in SQl 
> Manager. The Ultradev Recordset Test function displays the data OK, but 
> when the field is inserted in an asp page, the folling errror is 
> Microsoft OLE DB Provider for ODBC Drivers error '80040e21' 
> Multiple-step OLE DB operation generated errors. Check each OLE DB 
> value, if available. No work was done. 
> /admin/sugread.asp, line 43
> Line 43 below:
> <p><%=(suggestions.Fields.Item("charDesc").Value)%></p>
> Any help much appreciated.

  Return to Index