Notices

Great community. Great ideas.

Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: Registration limit

Results 1 to 5 of 5
Share This Thread →
  1. #1
    Navillus is offline Registered User
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Red face Registration limit

    Anyone know a good tutorial/link for limiting the amount of users that can register for an event? For example, after 150 people register, the page will let you know that registration is full and can no longer accept more.

  2. #2
    phoenixaz is offline Contributing User
    Join Date
    Feb 2008
    Posts
    790
    Rep Power
    30
    I suppose there are several ways to do that. One easy way would be to put this code at the top of the form page:

    set objConn = server.CreateObject("adodb.connection")
    objConn.Open application("Your_ConnectionString")

    SQL = "SELECT SUM (UserNameField) from YourTable Name"

    Set objRS = objConn.Execute(SQL)

    if objrs("UserNameField") >150 then
    response.Write "Sorry registration is full"
    response.end
    end if

    or you could do a redirect instead of a message.

  3. #3
    bigmike1212's Avatar
    bigmike1212 is offline 0x800A0C93
    Join Date
    Jan 2009
    Location
    Ridin' through this world...
    Posts
    2,975
    Rep Power
    1310
    COUNT instead of SUM.
    Brinkster- free development account. Not affiliated, but I sure like free. Brinkster.com

  4. #4
    sycleDelt is offline Registered User
    Join Date
    Oct 2012
    Location
    Russia
    Posts
    5
    Rep Power
    0
    I agree with you, thanks for the help in this question. As always all ingenious is simple.

  5. #5
    Navillus is offline Registered User
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0
    Thanks Phoenix for your answer! Much thanks!

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

Similar Threads

  1. Is there a field limit or width limit in reports?
    By AdamsKelly in forum Microsoft Access Help
    Replies: 6
    Last Post: June 9th, 2009, 11:11 AM
  2. Registration Sign-up Limit
    By ckoerner in forum ASP Development
    Replies: 5
    Last Post: February 18th, 2008, 09:28 AM
  3. Registration Asp
    By the_marioguy in forum ASP Development
    Replies: 5
    Last Post: July 10th, 2007, 09:16 PM
  4. Registration
    By iceman25 in forum .NET Development
    Replies: 0
    Last Post: November 22nd, 2005, 01:12 PM
  5. Limit Event Registration
    By kiwirox in forum ASP Development
    Replies: 1
    Last Post: November 6th, 2003, 01:10 PM

ASP Free Advertisers and Affiliates