473,387 Members | 3,684 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.

ASP/Access question

Hi,

I have two Ms Access tables:

table 1:
priceCodeTitle / TicketTypeID / price
-------------------------------------------------
adult / 1 / 20
adult / 2 / 50
kids / 1 / 10
kids / 2 / 20


etc

table 2:
TicketTypeID / TicketTypeName
----------------------------------------------
1 / halfday
2 / fullday


The ticketTypeID in table one relates to the field of the same name in table 2.

I need to produce a result from these tables that displays on my site as a html table of this structure:

halfday fullday
Adult 20 50
Kids 10 20


Simple so far… and I have a sql statement that joins the two tables something like this:

SELECT table1.*, table2. TicketTypeName FROM table1, table2 WHERE table1. TicketTypeID = table2. TicketTypeID

(forget the syntax, but you get the idea)

My problem when building the tables from these results is that the user may add any number of TicketTypes or any number of PriceCodes. They may also switch off any price for any particular entry (ie..Adult Fullday will display N/A)

I’m having trouble buiding this table in asp.. Someone did attempt to explain it to me by saying that I needed to build some sort of a matrix in memory, and check at each position on the table whether there is an associated value to fit in here. Which makes great sense in a general logic discussion – but when it comes down to actually building it, I am completely stumped as to where to start.

Can anyone help me out?

F

PS – I know it would be possible to create a similar table to the one needing to be produced in the database. But this would involve the site administrators adding and deleting rows from a table – which I cannot allow them to do.
Sep 24 '07 #1
1 1072
jhardman
3,406 Expert 2GB
F,

Since the table to be displayed uses the ticketTypeName as the head of each column, rather than try to open them all with the same query, I would just open the ticketType table and dump all of that data into a large array such that type(1) = "halfday", type(2) = "fullday" etc. Then open the other table, and order by priceCodeTitle AND ticketTypeID. Then you should be able to scroll through this recordset, and put the correct prices in the correct columns etc. Does this make sense?

Jared
Sep 25 '07 #2

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

Similar topics

0
by: sedefo | last post by:
I ran into this Microsoft Patterns & Practices Enterprise Library while i was researching how i can write a database independent data access layer. In my company we already use Data Access...
13
by: bill | last post by:
I am trying to convince a client that dotNet is preferable to an Access project (ADP/ADE). This client currently has a large, pure Access MDB solution with 30+ users, which needs to be upgraded....
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
64
by: John | last post by:
Hi What future does access have after the release of vs 2005/sql 2005? MS doesn't seem to have done anything major with access lately and presumably hoping that everyone migrates to vs/sql. ...
18
by: Andre Laplume via AccessMonster.com | last post by:
I have inherited a bunch of dbs which are are shared among a small group in my dept. We typically use the dbs to write queries to extract data, usually dumping it into Excel. Most dbs originated...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
43
by: sinister | last post by:
Is MS Access a true RDBMS?
21
by: Bigpond News | last post by:
Work at a large site - 1000+ PC's. Mixture of Win98 & WinXP. Majority of applications using Access 97. If I compile the Acc97 application on a Win98 PC, the .mde will run perfectly on both...
2
by: HeMan_Speaks | last post by:
I m currently developing a java based application and want to know how can i make client access database located on the server?
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.