Subject | Re: [ib-support] limit the number of records? |
---|---|
Author | Daniel Bertin |
Post date | 2002-03-27T01:57:41Z |
Hi,
nice, my intention was to give a demo to a user, where the code, would
limit him to entering x number of records. It would restrict him from
entering any more that the limit amount, and then be able to change that limit.
this would be workable
Thanks
Daniel
At 10:29 PM 26/03/2002 -0300, you wrote:
nice, my intention was to give a demo to a user, where the code, would
limit him to entering x number of records. It would restrict him from
entering any more that the limit amount, and then be able to change that limit.
this would be workable
Thanks
Daniel
At 10:29 PM 26/03/2002 -0300, you wrote:
>If I get what you want you could do something like this:[Non-text portions of this message have been removed]
>
>This is only a "road map", the code below *will not compile*, it's just to
>see if a get what you want, if it's what you want tell me and I will
>produce a "workable code".
>
>The code below will teste in a trigger (before insert) if the quantity of
>record inserted in the last hour is greater than some limit. Or do you
>prefer some kind of "human reset" so only the "administrator" could say
>"Ok. Joe go ahead now you can insert a more "X" records". You could create
>another table that holds periods (even slices of days) and the quantity of
>records that some user could insert, I don't know the intention for this
>check, but there are a lot of ways to get this work.
>
>Create Table Friend( Name varchar(50),
> Phone varchar(30),
> UserID integer,
> TimeStamp Date); -- NOTE Dialect 1 here
>
>in the before insert trigger you could put something like this:
>
>Select
> count(*)
>from
> Friend
>where
> UserID = New.UserID and
> (Now - TimeStamp) < (1/24) -- for a hour period
>into
> :Qtd
>
>if Qtd > 10
> Raise Exception
>
>
>HTH
>
>Alexandre
>
>At 16:06 26/03/02 -0800, you wrote:
> >Hi all,
> >I'm a little puzzled,
> >I would like to limit the number of records a user can enter into a table,
> >and am looking for suggestions on how I should accomplish this.
> >A routine on the client or on the server? on the client counting the number
> >of records, how often or when should I count?
> >on the server with a stored procedure, executed at certain intervals or on
> >a trigger?
> >I would like to stop the user from entering anymore records into a table
> >after he has reached a certain limit(#of records).
> >I'm using D5,IBO,FB1,
> >Would someone have a suggestion on how I should accomplish this task?
> >Thanks in advance
> >Daniel
>
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
><http://rd.yahoo.com/M=217097.1902236.3412362.1261774/D=egroupweb/S=1705115386:HM/A=999859/R=0/*http://service.bfast.com/bfast/click?bfmid=29150849&siteid=39282504&bfpage=account>72e4c8b.jpg
>72e4d2b.jpg
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to the
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.