programatically limit total records added to a particular field

J

James Monroe

In an access database I want to programatically limit total records added to
a particular table.

Basically I have a commerical ASP application and I am making a feature
limited downloadable demo.
It is a photo album application and the demo only allows a maximum of 3
albums in the database.

Now, using ASP code I can limit this pretty easily. I also have the Access
database pretty locked down so it shows a form with a message on it on
startup and no menus or shortcuts are available. etc etc So it would pretty
hard for the average person to manualy edit the database. You literally can
not get to anything unless you really know your stuff.

My question is.. in case they overide the ASP code can I program something
into access so the Albums table in the database can only ever hold 3 records
no matter what ?

I was sneaky with the ASP code (messed it up/encoded it) but someone still
might figure it out. This way they are double screwed if they try to bypass
the limits. Sure they could make their own database from scratch but there
are a lo of tables and fields and it would take a long time to get it all
right.

I need to make the demo crippled and keep it that way obvously...
My access skills are lacking when it comes to things of this nature.

Is this possible. I know there is a lot of crazy things you can do in
access.

Thx...
 
J

James Monroe

Now I also realize they could connect to the database and replicate it to
see the tables and fields and make a new database. (dont think I can stop
that expecially not using dlls for the data connection/ it's soruce code so
they see everything)

But I am still looking for an answer for the access database limitation
possibility
 
A

Arvin Meyer

Since Access (actually JET) is not a client server database, there are very
few rules enforceable at table level. If you can secure your tables you can
keep them out by limiting the value of an autonumber field to:

<4

in the validation property of the field. Without securing the tables there
is little you can do.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
J

James Monroe

thx for the response..

that suggestion wouldnt really work in this case because I want them to be
able to delete and create albums as they test the application.. thus.. the
autonumber field could be any number after a while

just never more than 3 records at once in that table is the goal here

oh well.. seems it will have to be the way it is unless someone else has an
idea
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top