•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 391,549 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,566 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 764 | Replies: 2
![]() |
•
•
Join Date: Jul 2005
Location: Dallas, TX
Posts: 481
Reputation:
Rep Power: 4
Solved Threads: 19
I would do two things:
on the front end when displaying the list of available classes, check the number of students already enrolled.
On the back end, use a stored procedure to add a student to a class
i would do it something like this.
then, after you try to insert the student you can check the returned field to see if it was successful and let the user know. (-1 means insert failed, otherwise the new number of students in the class)
on the front end when displaying the list of available classes, check the number of students already enrolled.
On the back end, use a stored procedure to add a student to a class
i would do it something like this.
sp_addStudent (@studentid int, @classid int) as declare @count int set @count = (select count(*) from tblClassroster where classid = @classid) if @count >19 set @count = -2 else insert into tblClassroster values (@classid, @studentid) select (@count +1) as NumberInClass
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
- phpBB bots creating fake users! (Growing an Online Community)
- Please help! (Java)
- phpBB database incompatibility (php-nuke) (PHP)
- Looping and data merging (Python)
- Lost admin rights on XP even tho user profile calls me 'Admin'! (Viruses, Spyware and other Nasties)
- Memory problem? (Windows NT / 2000 / XP / 2003)
- Access Violation (Segmentation Fault) + atol (C++)
Other Threads in the ASP Forum
- Previous Thread: ASP help for newbie
- Next Thread: URL Encoding


Linear Mode