Limiting records in a table? 
Author Message
 Limiting records in a table?

How do I limit the number of records in a table? Say I have a table called
"Timekeepers". I only want the user to be able to key in a maximum of 3
Timekeepers, how do I do this?

I see the problem if a timekeeper leaves, but how dow you limit the number
of records? Needless to say, if you loose a timekeeper, it would be easy to
change their code to a new one and let it SEEK and REPLACE from the old to a
new one.

Very truly yours,

Jonathan Morningstar
Morningstar Technology Corp.
Greenville South Carolina USA



Sun, 27 Aug 2000 03:00:00 GMT  
 Limiting records in a table?

Quote:

> How do I limit the number of records in a table? Say I have a table called
> "Timekeepers". I only want the user to be able to key in a maximum of 3
> Timekeepers, how do I do this?

If each record has a user's login, and if
        COUNT TO lnLimit FOR login = m.MyLogin
        IF m.lnLimit > 2
          * disable the <Add> button
        ENDIF

Jack



Sun, 27 Aug 2000 03:00:00 GMT  
 Limiting records in a table?

Quote:

> How do I limit the number of records in a table? Say I have a table called
> "Timekeepers". I only want the user to be able to key in a maximum of 3
> Timekeepers, how do I do this?

> I see the problem if a timekeeper leaves, but how dow you limit the number
> of records? Needless to say, if you loose a timekeeper, it would be easy to
> change their code to a new one and let it SEEK and REPLACE from the old to a
> new one.

> Very truly yours,

> Jonathan Morningstar
> Morningstar Technology Corp.
> Greenville South Carolina USA

  Supply the table with three records with the app and do not include the
ability to append new records.

Another method would be to check the number of records before appending a new
record.

IF RECCOUNT()< 3
    INSERT INTO
ELSE
    WAIT WINDOW "The permitted number of record alreay exits"
ENDIF



Sun, 27 Aug 2000 03:00:00 GMT  
 Limiting records in a table?

FWIW, didn't you ask this question last week or the week before?  If it was
you, then you got a number of suggestions that are probably still available
at www.dejanews.com if your newserver has expired them.

--

Nancy Folsom
(abqnfatdamescom--replace the word at and put a dot before the com)


Quote:
>How do I limit the number of records in a table? Say I have a table called

...snip


Mon, 28 Aug 2000 03:00:00 GMT  
 Limiting records in a table?

Yes, but keep in mind RECCOUNT() counts records in spite of its deletion
stated. Perhaps if you create an filtered index like

        INDEX ON tmKeeperId TAG tmKeeperId FOR RECNO()<=3

can be added to the other collegues' suggestions to achieve a more improved
security

Greetings from Argentina (and sorry for my poor english)

Carlos



Tue, 29 Aug 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Can anyone tell me the Record Limit of a table

2. Clipper 5.01 memo record limit?

3. How to limit the records for SQL-Pass-Through

4. Limit Records Returns

5. Can't limit records in the grid

6. How to limit the records for SQL-Pass-Through

7. How to limit the output record count ...

8. export to .xls record limit

9. Record Limits on COPY TO/EXPORT - VFP 3.0

10. FoxPro 2.5 File/Record Limits

11. Fox Record Limits

12. VFP Grids: limiting display to current record in change mode

 

 
Powered by phpBB® Forum Software