Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using MM framework, how could I create a Demo?
Message
 
À
11/12/2003 10:25:39
Scott Malinowski
Arizona Fox Software LLC
Arizona, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00853695
Message ID:
00858297
Vues:
20
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
Fil
Voir

Click here to load this message in the networking platform