Can I limit database size

  • Thread starter Thread starter Ted
  • Start date Start date
T

Ted

I waqnt to restrict the size for an "Access' database.
Can I set a maximum number of records for the total
database, or for a selected table? Or, can I set the MB
sizefor the database?
 
You could right your own application that would warn and/or make it
difficult to add additional records.

Just out of curiousity, why?
 
I waqnt to restrict the size for an "Access' database.
Can I set a maximum number of records for the total
database, or for a selected table? Or, can I set the MB
sizefor the database?

As noted elsethread, there's nothing builtin to do this. You can limit
the number of records in any single table by specifying an Integer or
Long Integer primary key, with a Validation Rule of
0 AND <= 1000

to limit the table to 1000 records, for example.
 
That will keep the number to less than 1001 but it may also many not
allow a full 1000 records due to the tendency of autonumber not to be
consistent, just unique, will it not?

--
Joseph E. Meehan

26 + 6 = 1 It's Irish Math
 
I want to create a version that can be used for demo
purposes only. A time limit is not sufficient for this
application (I would have to make the time use so short
that it wouldn't be practical).
 
That will keep the number to less than 1001 but it may also many not
allow a full 1000 records due to the tendency of autonumber not to be
consistent, just unique, will it not?

quite true! I didn't intend an Autonumber, rather an Integer (manually
or programmatically maintained) - I should have clarified that.
 
You could implement a timer that every X seconds checks the size of the
database through Visual Basic. Most VB books should list basic file I/O
operations and LOF(Filenumber) is the actual function to get the length (at
least according to my book, heh). The only downside to this is that the
directoy name would have to be known before run-time (unless you want to get
really fancy ;).
 
Travis Cornwell said:
You could implement a timer that every X seconds checks the size of
the database through Visual Basic. Most VB books should list basic
file I/O operations and LOF(Filenumber) is the actual function to get
the length (at least according to my book, heh). The only downside
to this is that the directoy name would have to be known before
run-time (unless you want to get really fancy ;).

No it wouldn't. CurrentDb.Name will always give the path and file name
of the current database.
 
So you did. I misread your message. I guess it was a good point to
make anyway.

--
Joseph E. Meehan

26 + 6 = 1 It's Irish Math
 
Ted said:
I want to create a version that can be used for demo
purposes only. A time limit is not sufficient for this
application (I would have to make the time use so short
that it wouldn't be practical).

Tools available from sites such as sysinternals.com can crack any
method you use to store a future date anywhere on a system such as in
the registry or a file.

Thus I prefer to limit the number of records in one key table such as
5 units or 50 volunteers but allow unlimited access for everything
else. Once I get paid then I email them an encrypted file containing
the number of records they are licensed for as well as their company
name which goes on the bottom of every page of every report.

For more of my thoughts on this topic see my "Copy protection or how
to safely distribute a demo Microsoft Access Application" page at my
website.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
Back
Top