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

read large db fields

Status
Not open for further replies.

stvchezgm123

Technical User
Mar 17, 2007
1
US
I have a simple task that I need to work out. the field in my db (comments) needs to be limited, then a conditional read more gets set in place.

here's what I have so far:

' this is the field, limited to 200 characters
<%= Left(rs("comments"),200) %>

<%

if len(rs("comments")) > 200 then
response.Write("read more...")
end if %>

when I do a response.write of the above, i get a value of zero, so I'm doing something wrong.
 
What are you reponse.write(ing) that gives you a value of zero? The len(rs("comments")) variable?

If so, are you sure that you are returning a value from your database? I would check on that just to be sure and then go from there.

------------------------------------------------------------------------------------------------------------------------
"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
- Winston Churchill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top