Information générale
Catégorie:
The Mere Mortals Framework
One other idea would be to limit the number of rows inserted into a main table. For example, I developed a trade entry program and limited the number of trades that could be entered to a certain number. If your application is say an order entry app, you could limit the number of orders.
The way I did this was to add the following code to the new method of the trade entry form:
DODEFAULT()
IF FILE(RTRIM(goApp.getSetting('DBC Locations - Local', 'trades', '')) ;
+ "demo.txt") AND v_trade.trade_id > 100
= MESSAGEBOX("No more trades can be entered! Contact Software vendor!", ;
MB_OK + MB_ICONINFORMATION, "System Message")
thisform.cmdClose.Click()
ENDIF
This limited the number of trades to 100 if the file demo.txt existed in the data path. To release the demo, you could just tell them to delete the demo.txt file, or if you do not want to let them know this, just deliver a new setup file that does not include this file in the distribution.
To make it more secure, instead of hard coding the number of rows in the statement above, create a column in the system value table previously mentioned that would hold the number of rows you want to limit the object to. Then place that value into the IF statement. Also, eliminate the reference to the demo.txt file since it would not be needed.
Good luck!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement