Jump to content

Limit Database Records


drdigital9
 Share

This topic is 7124 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This seems like it should be an easy thing to do, but I have been searching and have come up empty.

How can I limit a database to accept 50 records and then stop. In effect the database is full at that point?

An explanation, or some keywords to search this forum would be very helpful.

I have tried: Full, Limit, Restrict

Link to comment
Share on other sites

Hi, I avoid scripts in web databases ('cos I've never got them to work!) and try to substitute calculations.

Would this work for you:

Have a serial number and use an FMP-IF in the new record page which delivers different html if the serial >50

It could either return 'sorry, maximum number of submissions received' instead of the form or just change the form action to another database if you wanted to continue to capture the info somewhere else.

This won't stop the database from accepting records over 50, but users won't be able to submit from a web page.

regards, Jeff

Link to comment
Share on other sites

Hi, I avoid scripts in web databases ('cos I've never got them to work!) and try to substitute calculations.

Would this work for you:

Have a serial number and use an FMP-IF in the new record page which delivers different html if the serial >50

It could either return 'sorry, maximum number of submissions received' instead of the form or just change the form action to another database if you wanted to continue to capture the info somewhere else.

This won't stop the database from accepting records over 50, but users won't be able to submit from a web page.

regards, Jeff

Link to comment
Share on other sites

Jeff, I offer a script solution for sale at my website so you don't need to reinvent the wheel.

Regarding Jeff's suggestion of the If conditional, a serial no is not necessary.

Try:

[fmp-if: currentrecordcount .lte. 50]

show proceed text

[fmp-else]

no way to proceed.

Jeff's caveat is still valid with this.

[ April 18, 2002, 04:54 PM: Message edited by: Keith M. Davie ]

Link to comment
Share on other sites

An earlier post might suggest a sctiptless solution: validate a field, with the validation as "Status(CurrentRecordCount) <= 50

When somebody tries to add a new record, the validation will fail, the record will not be created (strictly speaking I bvelieve it is created then immediately deleted) and the error page will be returned. TRap for the validatio failure on thr error page.

Test the validation first to see if it'll work. If it does it'll be *really* neat.

Link to comment
Share on other sites

This topic is 7124 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.