472,353 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 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)

Im 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 1051
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....
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...
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...
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...
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...
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,...
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...
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...
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?
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

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.