This topic is locked

Creating scheduling app - need help

2/11/2008 2:45:19 PM
ASPRunnerPro General questions
S
sleighbor author

Hello,
I am just starting out with ASPRunner and am stuck. I am trying to create a an application for our dance studio that will list students, classes and the classes they are in.
Since the students can be in multiple classes what I was thinking, and please correct me if I am wrong, was to create three tables, called student, class and schedule. The schedule table would have two fields holding studentID and classID so that I could keep track of the members.
Using the Application Wizard in ASPRunner works great for the student and class tables. But I am not sure how to use the schedule table. What I would like is that each students view would have a link to view the classes they are in and each class view would have a link to show the students. I have no problem created the SQL code to retrieve the info, I am just not sure where to place this SQL code in ASPRunner.
If anyone could just help me get one of these working then I am sure that I will be able to complete the rest. I am just stuck at the moment.
Thank you in advance for your help!

Kevin

Sergey Kornilov admin 2/11/2008

I recommend to check the Calendar template:

http://www.asprunner.com/forums/index.php?showtopic=6818

S
sleighbor author 2/12/2008

Hi Sergey,
Thanks for the reply. I just played with the calendar demo and that it not exactly what I am looking for. I like the layout that the application wizard gives me for the student and class table. I would just like to add a new column with a link that would run a sql query for me, displaying the data on a different page.
Thanks,

Kevin

J
Jane 2/13/2008

Kevin,
you can use master-detail relationship for this purpose.

S
sleighbor author 2/13/2008

Hi Jane.
Thanks for the response. I just tried using the master-detail relationship. This looks like this will work except that it outputs the details of the schedule table. Instead I need it to perform an JOIN and get the data data from the class table. How can I modify the query behind the schedule link? I have uploaded my site to my demo account if you would like to take a look. Here is the URL:
http://demo.asprunner.net/kevin_ob_usa_net/Project1/menu.asp
Click on student and you will see a column for schedule that I would like to change.
Thank you,

Kevin

S
sleighbor author 2/13/2008

Maybe I'm looking at it wrong. Maybe I should only have the two tables, classes and students, and not the third table to link them. Any suggestions would be appreciated.
Thanks,

Kevin

S
sleighbor author 2/13/2008

I'm definitely going to need the third table because I have a many-many relationship. A student can belong to many classes and a class can have many students. This third table is the only way I can keep track of it.
So I will need to create a master-detail relationship for student and schedule and also for class and schedule. Then I would run an INNER JOIN to to get the recordset. Can you please tell me what files I would need to modify or how to modify the layout to accomplish this?
Thank you,

Kevin

J
Jane 2/15/2008

Kevin,
you can edit SQL query for schedule table on the Edit SQL query tab. Use Query Designer to join all required fields from students or classes tables.
Also I recommend you to use Lookup wizard option on the "Edit as" settings dialog on the Visual Editor tab for classid field on the schedule table.