Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Parse a string from a field and display in table

Reply
Thread Tools

Parse a string from a field and display in table

 
 
Dan Somdahl
Guest
Posts: n/a
 
      04-19-2007
Hi, I am new to ASP but have what should be a fairly simple task that I
can't figure out.
I need to parse a string from a single, semi-colon delimited, 60 character
field (el_text) in a recordset and display the results in a table on a
webpage (ASP)

I can retrieve the recordset from the database and display the field data
results in rows of a table but have the entire 60 character string in one
cell. I need to break that string apart and put each semi-colon delimited
value in it's own cell. Then move to the next record and do the same thing
in the next row of the table. - and so on

I'm using ASP, VB Script with DMSII Database and OLEDB

Does anyone have some code examples on how to break this field apart and
then arrange the data into an html table on a webpage?

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      04-19-2007
Dan Somdahl wrote:
> Hi, I am new to ASP but have what should be a fairly simple task that
> I can't figure out.
> I need to parse a string from a single, semi-colon delimited, 60
> character field (el_text) in a recordset and display the results in a
> table on a webpage (ASP)
>
> I can retrieve the recordset from the database and display the field
> data results in rows of a table but have the entire 60 character
> string in one cell. I need to break that string apart and put each
> semi-colon delimited value in it's own cell. Then move to the next
> record and do the same thing in the next row of the table. - and so
> on
>
> I'm using ASP, VB Script with DMSII Database and OLEDB
>
> Does anyone have some code examples on how to break this field apart
> and then arrange the data into an html table on a webpage?


No, I have no example. I would have to write it myself using the Split()
function to break the string up into segments using ; as the delimeter
argument. Then I would loop through the resulting array writing the
string into a new string of html to form the table cells.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript validation for a not required field, field is onlyrequired if another field has a value jr Javascript 3 07-08-2010 10:33 AM
Parse a string from a field and display in table Dan Somdahl ASP General 1 04-21-2007 11:32 AM
1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Sound Javascript 2 09-28-2006 02:43 PM
parse and display parts of query string Scott Javascript 5 05-05-2005 05:09 PM
How to parse a string like C program parse the command line string? linzhenhua1205@163.com C Programming 19 03-15-2005 07:41 PM



Advertisments