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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving data from a SQL text field

Status
Not open for further replies.

SgtBadass

MIS
Jul 16, 2002
19
GB
This is nutty.

I've got a recordset which retrieves some tables from a database. One of the fields is defined as 'text' in SQL server, and won't display in the resulting ASP page. If I change the SQL field to a varchar, it works!

Any idea how I can get the text to display?
 
The major differance between the text field and the varchar field is that the text field will pad any entries to the maximum size so that every entry will always be the maximum specified size in the design. In my opinion you would be better off with varchar.
I'm not sure why your having difficulty printing the contents of the field when it is in text, I have not had the particular problem before, but I do know that text fields can be rather finicky. Try placing the field name as the last field name in your select statement and you could try to Trim() ir before displaying it.
-Tarwn "The problem with a kludge is eventually you're going to have to back and do it right." - Programmers Saying (The Wiz Biz - Rick Cook)
"Your a geek!" - My Girlfriends saying
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top