473,383 Members | 1,837 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Memo record return limit

Hi there looking for a lil help. Using ASP, VBScript, with an Access DB

<%
Dim rsBlog
Dim strSQLBlog
Set rsBlog = Server.CreateObject("ADODB.Recordset")
strSQLBlog = "SELECT * FROM Blog_Tbl ORDER BY ID DESC "
rsBlog.Open strSQLBlog, cn

Response.Write (rsBlog("Comments"))
rsBlog.Close
Set rsBlog = Nothing
%>

So I got this script which returns a memo record but I want to limit the lenght of the returned record. So if it's 1,000 words long or charcters it only returns the first 500 then I can have a link that takes to another page where it writes the whole thing as it does above.

Any help with this would mean a lot. I'm not finding anything.. Thanks
Mar 29 '08 #1
1 1149
PianoMan64
374 Expert 256MB
Hi there looking for a lil help. Using ASP, VBScript, with an Access DB

<%
Dim rsBlog
Dim strSQLBlog
Set rsBlog = Server.CreateObject("ADODB.Recordset")
strSQLBlog = "SELECT * FROM Blog_Tbl ORDER BY ID DESC "
rsBlog.Open strSQLBlog, cn

Response.Write (rsBlog("Comments"))
rsBlog.Close
Set rsBlog = Nothing
%>

So I got this script which returns a memo record but I want to limit the lenght of the returned record. So if it's 1,000 words long or charcters it only returns the first 500 then I can have a link that takes to another page where it writes the whole thing as it does above.

Any help with this would mean a lot. I'm not finding anything.. Thanks
You would do the following:

Expand|Select|Wrap|Line Numbers
  1. <%
  2. Dim rsBlog
  3. Dim strSQLBlog  
  4. Set rsBlog = Server.CreateObject("ADODB.Recordset") 
  5. strSQLBlog = "SELECT * FROM Blog_Tbl ORDER BY ID DESC "
  6. rsBlog.Open strSQLBlog, cn
  7.  
  8. Response.Write (Left(rsBlog("Comments")),500) & "..."
  9. rsBlog.Close
  10. Set rsBlog = Nothing
  11. %>
  12.  
Mar 29 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: j.mandala | last post by:
I have a memo field in an appointment application that stores session notes for group psychotherapy sessions. Each attendee of the group has an appointment record. I want to be able to write a...
8
by: skinnybloke | last post by:
Hi - I have a problem with a memo field being truncated to about 255 characters when running a Access 2002 query. This only seems to happen if I use SELECT DISTINCT. It works ok using SELECT by...
4
by: Mal | last post by:
I have an ACC 2000 database that has a strange behaviour I have a small table, with just a few fields... My report has very simple grouping and sorting, no code bar a NODATA event. I have a...
2
by: Bob Dydd | last post by:
Hi Everybody I have a Listbox that has a Memo field attached to it's 2nd column which on double click copies the memo field to another Memo Field. Forms!! = ListClassification.Column(1) My...
1
by: Martin Heal | last post by:
I am having problems trying to assign the contents of a Memo table field to a String variable in VB using the following code: Private Function udfBuildSQL(SQLID As Integer) As Variant Dim rs...
4
by: steverossiter | last post by:
Hi and thanks, I have a Journalist database for tracking writers from various magazines and would like a field that could hold the text of their articles as they are published. The Memo field...
1
by: Montana_Trader | last post by:
I have a product database that includes a memo field for product descriptions. That database must be imported into a legacy system that has four text fields for product descriptions, each with a...
10
by: ARC | last post by:
This is mainly a speed question. In this example: I have a QuotesHdr table that has a few memo fields. If these memo fields are used extensively by some users, and if their are a large number of...
2
by: steph | last post by:
I have a table with 250 fields. Of course you are wondering why 250 fields... what could I possibly be storing in so many fields? I am using this table as a general import table for files that...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.