473,398 Members | 2,120 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,398 software developers and data experts.

Array subsets using ASP VBSript

JamieHowarth0
533 Expert 512MB
Hi there,

I'm new to the website - am a fairly seasoned ASP programmer and am working on a commercial application for my newly-founded business regarding e-commerce applications.

I have an array of items that I loop through to produce a category "tree" as such.
It's a base-10 array (0 to 9, then using digit index to work out parent categories and so on), so:
Top category = 0
First sub-category = 00
Second sub-category = 01
Second top category = 1

I'm using a Server Recordset object and MS Access (to be migrated to SQL Server at later date) connection to retrieve category information from a database and then manipulate it by converting it to an array.
Using the example above, how do I remove the first and second sub-categories from the array? Do I have to do a loop through the whole array and redefine it without the information I want to exclude (will take a performance hit as the removal will be performed on user input) or is there a quicker way?

Many thanks in advance,

medicineworker
P.S. If you want to see code samples to help answer the question please PM me & I will provide them.
May 2 '07 #1
2 1329
jhardman
3,406 Expert 2GB
Welcom to the scripts DN. I hope we can be of service.
They absolutely need to be removed, or is it enough to set them to null?
Jared
May 3 '07 #2
JamieHowarth0
533 Expert 512MB
Hi jhardman,

Sorted it in the end - looped through array, discounting the "minimised" (unneeded) categories, then printed array.
Will prob end up switching to ASP.NET TreeView controls with XML-based sitemap.config files (sitemap to be retrieved from DB categories) as I need to upgrade all my portfolio sites to .NET at some stage for a big contract coming up.

Cheers!

medicineworker/MPDDK-mm4
Jul 18 '07 #3

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

Similar topics

3
by: Simon | last post by:
Hi, I'm hoping you could show me examples of how a functional/declarative language could be used to consicely describe resticted subsets of elements. I'm looking for a 'specification' style...
4
by: Brett Calcott | last post by:
I've found some python solutions to find the set of subsets for a given set, but how do you find the set of the set of subsets whose union is the given set and whose intersections is the empty set....
7
by: Gaijinco | last post by:
I been thinking about this topic for a long time. The best I have done is the following code: #include <iostream> using namespace std; #include <cmath> int main(){ const int SIZE=3;
6
by: Denis C | last post by:
Hi I have a byte array of length 2404. I want to access subsets of the array and pass the subset to the constructor of a class. i.e. Dim bData(2403) As Byte Dim aThing As SomeClass = new...
25
by: Jessica Weiner | last post by:
I have an array of n integers and I want a function that returns a list of arrays of all possible subsets. Can someone provide me with the code? Thanks. Jess
14
by: Peter Hallett | last post by:
I would like to set up a string array as a class member, or field, and then populate this array by reading in from a text file, but I cannot find the appropriate syntax. The getter and setter are...
4
by: LurfysMa | last post by:
I could use some help with a table design problem. I have an electronic flashcard program. Actually, several of them. They each rely on a utility program to keep track of the usage statistics....
3
by: Lord0 | last post by:
I *think* I need to be able to validate subsets of an XML document using different schema. The functionality I'm trying to implement is this. a) External suppliers produce an XML document...
1
by: Rajesh V | last post by:
Hi, The aim of this C++ code is to print all the k-element subsets of a set of size n. But somewhere it goes wrong - it doesn't print the answer properly. I tried a lot to find the mistake, but...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.