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

selects in a mdb file

Hi,

I need to know how to retrieve many records from an access datafile,
one by one.
Let me explain you.

I have an array with 2 column by 1000 rows, in one column I have part
code, the other is for the cost that I have to search in a Access file.
I have to make one Select command with XXX Part code, retrieve the
cost, and then again to make another Select command with YYY Part code,
retrieve the cost, so on, for 1000 records.

How to make it? What is the best way to do it?

TIA

Apr 25 '06 #1
1 1414

<gf****@yahoo.com> wrote in message
news:11*********************@e56g2000cwe.googlegro ups.com...
Hi,

I need to know how to retrieve many records from an access datafile,
one by one.
Let me explain you.

I have an array with 2 column by 1000 rows, in one column I have part
code, the other is for the cost that I have to search in a Access file.
I have to make one Select command with XXX Part code, retrieve the
cost, and then again to make another Select command with YYY Part code,
retrieve the cost, so on, for 1000 records.

How to make it? What is the best way to do it?

TIA

Are you saying that you will need to retrieve the cost for all 1000 items
each time you use the array, or that you need to randomly retrieve cost for
individual parts as your program is used?
As 1000 entries is not a lot, as lookup tables go, there are several
options.
The suggestions below assume you are using the described Access table as a
lookup table.
You could create a datatable in a dataset from the Access table, then use
parameterized commands to retrieve individual part costs, using the part
code as the parameter.
You could also retrieve the data from the Access table using a DataReader,
then use the DataReader.Read() method to populate an appropriate data
structure with the lookup information as key - data pairs. Assuming you part
codes are unique, the sorted list should work.

Apr 25 '06 #2

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

Similar topics

1
by: Marc | last post by:
Hello, I have a form with multiple selects (pullDown). All selects have the same name but each select has a different value. The user selects a value in each select. When he submits the form I...
3
by: Henri Schomaecker | last post by:
Hi folks, does php 5 have a problem with html select lists which allow to choose multiple items? Whatever I tried I just can't get another or more than the last item selected in the list....
2
by: Mike | last post by:
Hello, I'm looking for an example of doing a page with pulldown menus, where the user selects a choice from the first pulldown, then based on that input, another appears, then the user selects...
7
by: Nick Calladine | last post by:
Hi On my form i have multiple select which all have an id value total1, total2, total3 etc so i am trying to detect how many there are and then use this to caculate a total. Is there a...
2
by: shwetu | last post by:
Need a file dialog box in asp.net 2.0 which selects folder not single file
2
by: johkar | last post by:
I have several related multi-selects on a page (country, state/ province, city, address). There are 4 - 7 other unrelated fields on the page also. Even though this is an intranet app where a...
1
by: Steve Richter | last post by:
How do I enable the file upload process to start as soon as the user selects the file? currently, I have two INPUT controls on the form. One is type=file and the other type=submit: <P><INPUT...
1
by: bjornsuneandersen | last post by:
I have a Stored Procedure that performs a simple SELECT. The Select have no locking hints or other hints and the database is set up in a standard configuration. The problem is that the SELECT...
7
by: gregincolumbus | last post by:
Hello I have used chained selects to populate two selects. When the user chooses from first select, he is presented with the populated data for the 2nd select. The result is a list of numbers. ...
10
by: sarega | last post by:
Here is the situation there is a list of contents from which the user can select the required contents to be displayed, but below these list of contents, the contents are actually displayed in the...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...
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...

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.