Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem displaying SQL Server "text" datatype

Status
Not open for further replies.

multiplex77

Programmer
Dec 25, 2001
302
SG
Hi,

Is there any known issue with displaying MS SQL Server 7 "text" datatypes using ASP resultsets?

When I try to display a text field, I just get an empty string (but no error). It's only when I change the field datatype to varchar(100), then the contents of that field get displayed.

Does this happen with other databases or versions of SQL Server?

Thanks for any advice.
 
text/ntext, etc fields have to be handled differently - look up GetChunk in ADO help. codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
try retrieving the text datatype separately from other datatypes (in a separate recordset.) i've also heard having it as the last column retrieved in a recordset helps, but i've had mixed success with that.

good luck!
 
Well, just to be a blatant pain :)
I never had that problem :)
Course, if I were you I would stick with varchar because I did find out after using texrt for a while why I kept having large amounts of whitespace after all of the data i pulled out of a textfield. varchar doesn't pad it's entries so I prefer because I am to lazy to trim every single time I print something from the db.
-Tarwn
 
Well, I had this same problem and found that if you reference the Text field LAST in the SQL statement it works. Not sure why but it does.
 
I use a stored procedure to retrieve the data but still I get no result on my page.... :-(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top