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
<p><%=(suggestions.Fields.Item("charDesc1").Value)%></p>
<p><%=(suggestions.Fields.Item("charDesc2").Value)%></p>
etc etc

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

You might want to check the following article:

http://support.microsoft.com/support/kb/articles/Q175/2/39.ASP

Hope this helps,

Imar


> On a couple of occasions I've had difficulty extracting data from 'text' 
> datatype fields holding data expressed as '<long text>' in SQl 
Enterprise 
> Manager. The Ultradev Recordset Test function displays the data OK, but 
> when the field is inserted in an asp page, the folling errror is 
displayed
> 
> 
> Microsoft OLE DB Provider for ODBC Drivers error '80040e21' 
> 
> Multiple-step OLE DB operation generated errors. Check each OLE DB 
status 
> 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