473,386 Members | 1,706 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,386 software developers and data experts.

Parse a string from field CORRECT EMAIL

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?

Apr 19 '07 #1
1 2014
"Dan Somdahl" wrote:
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)
JScript example:
for (; !RS.EOF; RS.MoveNext()) {
var a = RS.Fields("el_text").Value.split(";")
Response.Write("<tr><td>")
Response.Write(a.join("</td><td>"))
Response.Write("</td></td>")
}

Alternate JScript example:
for (; !RS.EOF; RS.MoveNext())
Response.Write("<tr><td>"+RS.Fields("el_text").Val ue.replace(/;/g,"</td><td>")+"</td></td>")

VBScript left as an exercise. I suggest you look at these functions:
http://msdn.microsoft.com/library/en...c7da8abe8c.asp
http://msdn.microsoft.com/library/en...8c39a939d4.asp
http://msdn.microsoft.com/library/en...657489dd34.asp

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.

Apr 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ken Bush | last post by:
How can I write an update query that removes part of a field? Like if I have a field with values such as 8/3/68 (a birthday obviously) and I need to put values in a new column but I need...
13
by: temp | last post by:
Hi all, I know this is easy for you guys but I am not a VB developer. My boss just wanted me to generate a mapping of all the queries in our Access DB. So I managed to create some subroutines to...
19
by: linzhenhua1205 | last post by:
I want to parse a string like C program parse the command line into argc & argv. I hope don't use the array the allocate a fix memory first, and don't use the memory allocate function like malloc....
3
by: Mark | last post by:
How do you parse a currency string to a decimal? I'd like to avoid having to parse the number out, removing the $ manually. That sounds like a hack. There are times that this string will be...
2
by: probashi | last post by:
Hi, I am trying to the following: String s = "( 54.05)"; decimal d = decimal.Parse(s); when s = "( 54.05)" I what the value -54.05 and s = " 54.05" I what the value 54.05
0
by: rdi | last post by:
I'm attempting to use regular expressions to parse email messages (I'm already able to download the message--I just need to parse them). I need to extract the "From", "To", "BCC" (if any) &...
0
by: KarenS | last post by:
I am using Microsoft Developer Environment 2003 Version 7.1.3088 and .NET Framework version 1.1.4322 SP1. From my web-service I get one row of data and return it to my client. From my client I...
3
by: starke1120 | last post by:
I have a table (tblVAS) that contains a field called VAS (Value Added Servies). This field is imported from an AS/400 and the filed contains several codes that relate to Value Added Services. The...
29
by: gs | last post by:
let say I have to deal with various date format and I am give format string from one of the following dd/mm/yyyy mm/dd/yyyy dd/mmm/yyyy mmm/dd/yyyy dd/mm/yy mm/dd/yy dd/mmm/yy mmm/dd/yy
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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: 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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.