Web app that limits access by the # of objects created

Discussion in 'ASP .Net' started by Richard, Jul 16, 2004.

  1. Richard

    Richard Guest

    I'm not quite sure the best way of going about this (code in the
    business tier or stored procedure on the SQL Server). I have an
    e-commerce web app that generates labels for the user. The sales
    department wants to offer "packages" where the customer pre-pays for n
    amount of labels made. Once they hit their limit, the feature is
    disabled.

    Since I'm not the best SQL guru, I'm not sure how to store data for
    this scenario, or even know if there is some sort of "bell and whistle"
    in SQL Server that I don't know about.
    Any ideas are always appreciated.

    - Richard
    - MAIL, Inc
     
    Richard, Jul 16, 2004
    #1
    1. Advertising

  2. Hmmm... It seems like you might want to keep track in your database of how
    many labels each customer has purchased, as well as the number they have
    pre-paid for. Then it's a simple query to find out if they have reached
    their limit.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Richard" <> wrote in message
    news:cd8ou0$...
    > I'm not quite sure the best way of going about this (code in the
    > business tier or stored procedure on the SQL Server). I have an
    > e-commerce web app that generates labels for the user. The sales
    > department wants to offer "packages" where the customer pre-pays for n
    > amount of labels made. Once they hit their limit, the feature is
    > disabled.
    >
    > Since I'm not the best SQL guru, I'm not sure how to store data for
    > this scenario, or even know if there is some sort of "bell and whistle"
    > in SQL Server that I don't know about.
    > Any ideas are always appreciated.
    >
    > - Richard
    > - MAIL, Inc
    >
     
    Kevin Spencer, Jul 16, 2004
    #2
    1. Advertising

  3. Richard

    Lucas Tam Guest

    "Richard" <> wrote in news:cd8ou0$nd5
    @odbk17.prod.google.com:

    > I'm not quite sure the best way of going about this (code in the
    > business tier or stored procedure on the SQL Server). I have an
    > e-commerce web app that generates labels for the user. The sales
    > department wants to offer "packages" where the customer pre-pays for n
    > amount of labels made. Once they hit their limit, the feature is
    > disabled.


    A simple way is to have a table with the UserID, Labels Purchase, Labels
    Used

    Enable the fuction if Labels purchased is >= Labels Used.

    Of course you can design the database tables to be much more complex (i.e.
    have a "Packages Table" which you reference) but that maybe a little too
    much for you if you're not familiar with SQL.

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
     
    Lucas Tam, Jul 16, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JonnyD
    Replies:
    16
    Views:
    769
    Paul Clement
    Oct 31, 2005
  2. jimjim
    Replies:
    12
    Views:
    1,909
    Ron Natalie
    Jun 3, 2005
  3. Replies:
    0
    Views:
    412
  4. Marlene A. Roman
    Replies:
    0
    Views:
    152
    Marlene A. Roman
    Jul 29, 2003
  5. Replies:
    0
    Views:
    158
Loading...

Share This Page