Need some direction for an app with two unrelated tables

B

bender

have written a simple application (IIS5, Access,FP, ASP) for users to
book one or more hourly timeslots to use a computer room. Clicking on
a calendar date, if a record for that date doesn't exist, it is
created and they are sent to a form where they can update the record
by clicking on one or more of 11 checkboxes beside the hours from 8am
to 6pm. They submit, and a string is concatenated to update the
record, poking their ID number (from a session variable where they
login) into any of the 11 fields representing the hours from 8 thru 6.
The next time anyone goes to that date record, if the timeslot is
taken, then the checkbox does not appear, and it says "reserved"
instead. Have also written a page where a user can see the dates and
hours reserved, and cancel if need be.

so far, so good. but now for a few management pages. Though I can
show the ID numbers against each hour in the day, management would
probably prefer to see the user's name instead (to print out a daily
schedule, or whatever). since the id and name are in a different
table (co), is there a way i could use a procedure or subroutine to
query the "co" table using the ID numbers?

i know this situation comes from the fact that the two tables i'm
using in the d/b, res for the dates, and co for the user's login and
ID numbers, are not related. but i've gotten this far using this
simple approach that i'd like to see if i can finish it off.

Thanks,
Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 
T

Thomas A. Rowe

As a alternative, why not store the user's name in a session and then write
that to the schedule table as well, since this is short-term table, you will
have no problem with info not matching the company table at some point.

Then when you print, just use the name field instead of the ID field.

There is nothing wrong with your initial approach, just a little more work
to accomplish the same output.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================
 
B

bender

As a alternative, why not store the user's name in a session and then write
that to the schedule table as well, since this is short-term table, you will
have no problem with info not matching the company table at some point.

Then when you print, just use the name field instead of the ID field.

There is nothing wrong with your initial approach, just a little more work
to accomplish the same output.
++++++++++++++++++++++++++++++++++++++++++++++++++++++
Good idea. I've already stored the user's name in a session variable
for the confirmation page, to say "Nick, your reservation for blah
blah is confirmed", etc., and for other reasons, but not in the table
itself. Hmmmmm.....

thanks for your time, I'll give it a go.

Larry
- - - - - - - - - - - - - - - - - -
"Forget it, Jake. It's Chinatown."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top