|
| |
|
|
Advance113
Posts: 3 Joined: 4/13/2004 Status: offline
|
"Registration full" check from database - 4/13/2004 10:21:16
I'm in need of some help figuring out a way to give a notification of a class being full from a registration form, so any help would be greatly appreciated :-) I'm using frontpage and access (both 2002) to setup the registration, and all is well. However, i'm wondering if there's any way that after say 20 people register, I can give some sort of "registration full" notice, and stop taking registrations, or at the very least stop the database from accepting registrations after the number is met. I've dabbled in asp and php, but I'm hoping there is an easier way so that I don't have to completely learn one of those for this "small" project. Any ideas? Thanks in advance, and thanks for such an informative forum!
|
|
|
|
Advance113
Posts: 3 Joined: 4/13/2004 Status: offline
|
RE: "Registration full" check from database - 4/13/2004 13:48:43
I'm trying to use the DRW, but it sounds like it's not quite going to be up to the task. Adding the dynamic links would be great, but that sounds like it may be a bit out of my current ASP level :-) Do you by chance have any resources for some simple asp logic queries like the one just to check the recordset for the ID# < 20 problem? Thanks for all your help!
|
|
|
|
bobby
Posts: 11394 Joined: 8/15/1969 From: Seattle WA USA Status: offline
|
RE: "Registration full" check from database - 4/13/2004 14:19:35
dim rsCheck
' set, create and open the recordset
set rsCheck=server.createobject("ADODB.recordset")
sqltxt="Select * from tblClass Where Name='Classname' and ID<20 ;"
rsCheck.open sqltxt, oConn
' if there are no matching records:
if rsCheck.EOF then
response.write "Sorry, this class is full..."
' otherwise
else
response.write "Sign up here..."
end if
rsCheck.close
set rsCheck=nothing
oConn.close
set oConn=nothing
That's very simplified, and the table and field names would need to be changed to exactly what's in your DB... also you might need a little more than just response.writing the messages above, but that should give you the idea... Also, where it references 'oConn' you'll need to set up the DB connection, either using a db Jet engine or DSN... I'm gonna zap this thread over to the ASP/Database forum. You can use the DRW for most of this, and if you need to you can put the code on the "Spooky Diet" and add the extras... I'm not well versed in the DRW, but there are many here who are. You can find a lot of good answers at www.aspfaqs.com, www.4guysfromrolla.com, www.aspin.com You can also find some prewritten scripts at www.hotscripts.com in ASP... there might be something there that would work for you as well.
< Message edited by bobby -- 4/13/2004 11:20:19 >
_____________________________
If con is the opposite of pro, is Congress the opposite of progress?
|
|
|
|
Advance113
Posts: 3 Joined: 4/13/2004 Status: offline
|
RE: "Registration full" check from database - 4/14/2004 8:16:43
Great, thanks for the replies! I'll give them a shot!
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|