Ask a Question related to ASP Database, Design and Development.
-
Mr Jahnfree #1
how to show part of a field?
I have a web page with messages.
I want to show the list of the messages only with part of them, for example
the first 30 letters/characters.
Now I use this string:
<%response.write rs("msg") %>
and it shows obviously the whole field (msg)
Which could be the right syntax?
Thanks,
Gianfranco
Mr Jahnfree Guest
-
bitmap inside canvas, do not show outside part
Hi, I have a canvas object in my app: <mx:Canvas id="canvas".../> Then in my actionsript, I use the following code to show a bitmap: var... -
only show part of a dynamic text field
ok i have this description field put in dynamically on my site but i only wnat the first 120 chars to show and thne ill put a link saying click here... -
How to show added on visible part of data grid.
hi, I met a problem. There is a data grid, I can add new item on it. At beginning, there are little items on data grid, so you can see all of... -
using php to show particular part of page
I have a particular section of a page that I need to display if the variable being passed is a certain name. The the particular block of code that... -
Part field Use
I am trying to set up a field which uses two different field togethe for a new number. That part is no problem. however I have a field with 6... -
Roland Hall #2
Re: how to show part of a field?
"Mr Jahnfree":
: I have a web page with messages.
: I want to show the list of the messages only with part of them, for
example
: the first 30 letters/characters.
: Now I use this string:
:
: <%response.write rs("msg") %>
:
: and it shows obviously the whole field (msg)
<% Response.Write left(rs("msg"),30) %>
or
<%= left(rs("msg"),30) %>
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - [url]http://www.microsoft.com/technet/scriptcenter/[/url]
WSH 5.6 Documentation - [url]http://msdn.microsoft.com/downloads/list/webdev.asp[/url]
MSDN Library - [url]http://msdn.microsoft.com/library/default.asp[/url]
Roland Hall Guest
-
John Scragg #3
Re: how to show part of a field?
You can also try to truncate the result set before it is even returned from the database. Assuming you are not using the full message text on the same page as you are displaying the summary, this could save some unnecessary data transfer. You could modify your SQL as follows
SELECT LEFT(msg, 30) As msg FROM tblMessage
If you use both a summary and the full text on the same page, it is better to use the VBScript function to truncate the message. But if not, letting the database truncate it for you should perform better and reduce the amount of data sent accross the network
Good luck
Joh
John Scragg Guest



Reply With Quote

