Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to truncate information from database

Posted on 2006-11-24
2
129 Views
Last Modified: 2010-04-25
I have a view page which displays a description field for each record in my database. Some of the description fields are too long and I want to cut them shorter on this page so that they only appear in full on the details page. Is there a way to cut off everything but the first 100 characters?

<td width="552">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=(rsrestaurants.Fields.Item("description").Value)%></td>
0
Comment
Question by:elliottbenzle
  • 2
2 Comments
 
LVL 17

Expert Comment

by:cem_turk
ID: 18009597
<td width="552">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<% document.write(Left(rsrestaurants.Fields.Item("description").Value,100))%></td>
0
 
LVL 17

Accepted Solution

by:
cem_turk earned 500 total points
ID: 18009608
oops mixed document.write with response.write :)

here you are

<td width="552">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<% response.write(Left(rsrestaurants.Fields.Item("description").Value,100))%></td>
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question