Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the maximum number of records allowed.
Message
From
05/05/2009 19:31:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/05/2009 19:30:06
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01398045
Message ID:
01398047
Views:
57
>>Is there any way to limit the number of records that can be added to a database using a setting in the table or command?
>>
>>Thanks,
>>
>>-Greg
>
>I don't think so. But on an editing form, when the user presses a button for a new record, you can easily check whether reccount() is above the allowed limit, and show an error message if it is, instead of adding the record.

Update: Actually, you could do this check in a function called from an Insert trigger. But it is not a simple setting - you would still have to do the actual check.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform