Hi guys.
I have a two-dimensional list. I need to see if a value is existing on the third column of each row. Just like searching a table with the third column as the index key.
Do you read each row checking the specific column? Or is there a method or function that will do it.
The value of this list is coming from a result set. Rather than keep on querying the sql-server, I am implementing it as a two-dimensional list. It's a limitation, so i don't have much choice.
If there are no methods or function that will do the search on the list, then I have to read each row. Would it make sense then that I just read the search the result set, reading each row, than putting implementing this on a two-dimensional list?
Thoughts?
-- CK
3 2651
Assuming you mean a 2D array, you'd be looping over matrix[i][2], I think. It would work similarly with la List, probably list.get(i).get(2). These snippets assume that I've got row/column down properly and that i is the loop counter.
Yes, you're right.
By the way you mention it, that would mean I have to loop and read each row until list.get(i).get(2) = 'myvalue' where i is a counter from 1 to size of the list. Am I right?
If this is the case, would be better if I just read the result set?
-- CK
Hi guys.
I have a two-dimensional list. I need to see if a value is existing on the third column of each row. Just like searching a table with the third column as the index key.
Do you read each row checking the specific column? Or is there a method or function that will do it.
The value of this list is coming from a result set. Rather than keep on querying the sql-server, I am implementing it as a two-dimensional list. It's a limitation, so i don't have much choice.
If there are no methods or function that will do the search on the list, then I have to read each row. Would it make sense then that I just read the search the result set, reading each row, than putting implementing this on a two-dimensional list?
Thoughts?
-- CK
Yes, IMHO it is a very bad choice to implement an entire row of a table as a list
that ends up in another list. Instead define a class that represents a row of a
table so you finally end up with a single list of class objects.
kind regards,
Jos
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Les Juby |
last post by:
A year or two back I needed a search script to scan thru HTML files
on a client site. Usual sorta thing. A quick search turned up a
neat script that provided great search results. It was fast,...
|
by: Noticedtrends |
last post by:
Can inference search-engines narrow-down the number of often irrelevant
results, by using specific keywords; for the purpose of discerning
emerging social & business trends?
For example, if...
|
by: Stanley Sinclair |
last post by:
Bear with me. I am being very calm; took a Valium. I have waited two
weeks to write this, because every time I wrote it before the message
was, at best, nasty.
I need to use the services of...
|
by: TH |
last post by:
I am (still :) working on a recipe database. Now I am trying to figure out
how to set it up for an ingredient search. What I want it to be able to do
is three things:
1. Search based on just...
|
by: TH |
last post by:
I am (still :) working on a recipe database. Now I am trying to figure out
how to set it up for an ingredient search. What I want it to be able to do
is to search by one ingredient, sometimes by...
|
by: joshc |
last post by:
If I have an array of data that I know to be sorted in increasing
order, and the array is less than 50 elements, and I want to find the
first element greater than a certain value, is a simple...
|
by: JohnR |
last post by:
I have an arraylist of string values. I would like to search the arraylist
to find the index of a particular string and I would like the search to be
case insensitive.
dim al as new arraylist...
|
by: Noticedtrends |
last post by:
Hello,
I'm seeking search-engine utilities that allow searches of content only
contained in titles (as opposed to regular searches that search through
all content)?
The tools provided in...
|
by: JP SIngh |
last post by:
Hi All
This is a complicated one, not for the faint hearted :) :) :)
Please help if you can how to achieve this search.
We have a freetext search entry box to allow users to search the...
|
by: iahamed |
last post by:
Hi Everyone,
I got two parts of my advance search to work, I am running out of Logic to
connect the third. My mind is in swing! Pleaseeeeeeeee Help me.
I have 3 Fiels to search, the First two...
|
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...
|
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...
|
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...
|
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...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
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
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |