I am trying to prevent a certain number of rows from getting into a table. When the total row count passes 950, I want to pop older rows from the beginning of the table. I made a stand-alone procedure file for my DBC events, and I just have one proc in it. When I open a table called "CATLV05" for example, I get "Insufficient Stack Space". I've been good, what's wrong?
Procedure dbc_AfterOpenTable ;
(cTableName)
If Upper(cTableName) = "CATLV"
Select Count(iID) from (cTableName) where iDel=0 Into Array arCatLvCnt
If arCatLvCnt[1] > 950
For iDelIt = 1 to (arCatLvCnt[1] - 949)
Update (cTableName) Set iDel=1 Where iDel=0
Next
EndIf
EndIf
EndProc