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

Seperating data from single table field (string)

Hi All

Can anyone help with this please.

I need a way of putting say 10 to 20 bullet points in one table field in an
Access database
- say seperate them with a special character, then build a bulletted list on
my page.

If I can get the page to detect each special character, insert a new bullet
and move on to the next occurance in the string...

e.g. point01%point02%point03%point04%point05%point06

to...

<ul>
<li>point01</li>
<li>point02</li>
<li>point03</li>
<li>point04</li>
<li>point05</li>
<li>point06</li>
</ul>

Many thanks in advance

vool
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
Jul 19 '05 #1
3 2444
Just store the terms as a comma separated list (or use a more robust
placeholder if commas are likely to appear in any term). When you retrieve
this string from the database split it on the placeholder, which generates
an array, and iterate through creating your HTML:

MyStringTerm = RS.Fields("MyString") ' contains "alpha,bravo,charlie"
MyStringArray = Split (MyStringTerm, ",") ' contains
("alpha","bravo","charlie")
Response.Write "<ul>"
For Each Term In MyStringArray
Response.Write "<li>"
Response.Write Term
Response.Write "</li>"
Next
Response.Write "</ul>"

Alan

"vool" <vo**@fsnet.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
Hi All

Can anyone help with this please.

I need a way of putting say 10 to 20 bullet points in one table field in an Access database
- say seperate them with a special character, then build a bulletted list on my page.

If I can get the page to detect each special character, insert a new bullet and move on to the next occurance in the string...

e.g. point01%point02%point03%point04%point05%point06

to...

<ul>
<li>point01</li>
<li>point02</li>
<li>point03</li>
<li>point04</li>
<li>point05</li>
<li>point06</li>
</ul>

Many thanks in advance

vool
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003

Jul 19 '05 #2
Wow that was fast, thanks Alan, that'll do the trick
"Alan" <SP******************@inspire.net.nz> wrote in message
news:#1**************@TK2MSFTNGP09.phx.gbl...
Just store the terms as a comma separated list (or use a more robust
placeholder if commas are likely to appear in any term). When you retrieve
this string from the database split it on the placeholder, which generates
an array, and iterate through creating your HTML:

MyStringTerm = RS.Fields("MyString") ' contains "alpha,bravo,charlie"
MyStringArray = Split (MyStringTerm, ",") ' contains
("alpha","bravo","charlie")
Response.Write "<ul>"
For Each Term In MyStringArray
Response.Write "<li>"
Response.Write Term
Response.Write "</li>"
Next
Response.Write "</ul>"

Alan

"vool" <vo**@fsnet.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
Hi All

Can anyone help with this please.

I need a way of putting say 10 to 20 bullet points in one table field in an
Access database
- say seperate them with a special character, then build a bulletted

list on
my page.

If I can get the page to detect each special character, insert a new

bullet
and move on to the next occurance in the string...

e.g. point01%point02%point03%point04%point05%point06

to...

<ul>
<li>point01</li>
<li>point02</li>
<li>point03</li>
<li>point04</li>
<li>point05</li>
<li>point06</li>
</ul>

Many thanks in advance

vool
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003
Jul 19 '05 #3
I'm glad Alan answered your questions, but I want to add that it's usually a
bad idea to store multiple pieces of data in a single field. This is a basic
tenet of proper database design. A better idea would be to create a separate
table with a one-to-many relationship between the original table and the new
table, allowing you to store each peice of data in its own row in the new
table.

You may be thinking that the list itself is a single piece of data, but this
is belied by the fact that you need to string together multiple pieces of
data to form it.

HTH,
Bob Barrows

vool wrote:
Hi All

Can anyone help with this please.

I need a way of putting say 10 to 20 bullet points in one table field
in an Access database
- say seperate them with a special character, then build a bulletted
list on my page.

If I can get the page to detect each special character, insert a new
bullet and move on to the next occurance in the string...

e.g. point01%point02%point03%point04%point05%point06

to...

<ul>
<li>point01</li>
<li>point02</li>
<li>point03</li>
<li>point04</li>
<li>point05</li>
<li>point06</li>
</ul>

Many thanks in advance

vool
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003


Jul 19 '05 #4

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

Similar topics

5
by: Alexandre | last post by:
Hi, Im a newb to dev and python... my first sefl assigned mission was to read a pickled file containing a list with DB like data and convert this to MySQL... So i wrote my first module which...
2
by: Chris Windsor | last post by:
I hope the following describe what I'm trying to do: I have created a tool to be used by product analysts when studying different cell phone designs. Part of the tool is a set of 11 forms on a...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
3
by: MLH | last post by:
Precise determinations are not the objective. I would lke a single button click approach to creating a report/table/dynaset - whatever - to display each table name and an approx- imation of the...
6
by: Jo K. | last post by:
I have a bounded field called Name. It's used to type in the full name of a customer (intentionally set up that way instead of seperating the first and last names) I would like to be able to...
4
by: orange | last post by:
I've got a database in .txt file similar to this: BookName;Author;Year;ReviewedBy;Rating;Pages Nemesis;Isaac Asimov;1989;13,31,24;good;110 Sense & Sensibility;Jane Austen;1970;45,32;great;120...
7
by: Sunny | last post by:
Hi All, I was wondering if any one knew how to create INSERT statement using the OleDbDataCommand, that includes single quotes in the data that is entered in the table fields. e.g. string...
2
by: Jim in Arizona | last post by:
Usually, If i need special formatting, I don't use the datagrid control and use a loop that processes a table for each record read from the database (as in classic asp) like so: ...
9
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.