Web app that limits access by the # of objects created

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

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
 
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.
 
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.
 
Back
Top