Click here to Skip to main content
15,881,735 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi I have a problem how to set the data base
I am using Ms access VB.net Strongly typed Data base
now i have 500 products
each product got 2 criteria for price W and H
so i used to have like a matrix on excel with 500 tables

ex

first table (Product A)
column 100 150 200 300
row 50 60 70
and the cell intersection is the price

second table (Product B)
column 135 145 205 310
row 54 62 75
and the cell intersection is the price

now to make an access database to be used in Visual studio VB.NET
what i need to do at the end is when i choose A 100 50 I get the price
do i have to make 500 tables!!! or is there an easier faster way
(Update "Their is no formula or pattern for any number :S")

can i make a 3D array in each access cell, then when i call that cell i have to give 2 parameters and it gives me the 3rd one ,so i call A, 100, 50 and it gives the price!?

Thanks
Posted
Updated 16-Jun-14 16:45pm
v5
Comments
Peter Leow 16-Jun-14 22:19pm    
How was the price for each product derived? Any formula?
Member 10862570 16-Jun-14 22:30pm    
Thanks
No, No formula

1 solution

Make table like this -

ID - Product - W_Price - H_Price
1 - A - 100 - 50
2 - A - 150 - 60
3 - B - 135 - 54
4 - B - 145 - 62

By this way you can save your 500 products into 1 table also you can get any value using combination of columns in your select query.
 
Share this answer
 
Comments
Member 10862570 17-Jun-14 2:39am    
It's a good solution thank you, but I didnt want to do it that way cause i will have like 1000000 rows :D
Raghubir_Sarkar 17-Jun-14 2:48am    
Ya in access it is slow to get a single value from huge amount of rows but for SQL its a good solution. If in your project products are grouped into 2 or 3 group then you can create separate table for groups and implement this solution but making so many tables for each type of product will also slow the execution and it doesn't make any seance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900