Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why wouldn't i want NeedUpdate/Update run at APP startup
Message
From
25/08/2000 07:26:23
Franz Mueller
J. Schuh Ges.m.b.H.
Kirchberg, Austria
 
 
To
24/08/2000 15:17:30
General information
Forum:
Visual FoxPro
Category:
Stonefield
Miscellaneous
Thread ID:
00408957
Message ID:
00409141
Views:
17
Hi,

I would write some pice of code in the XXFW.VCX/ctrApp.AfterOpenMainDatabase()-Method like this:

*
* check, to see if an Update is necessary
*

IF NOT VARTYPE(OMETA) = "O"
*
* no SDT available
*
RETURN .T.
ENDIF

IF FILE("UPDATE.TXT")) AND oMeta.oSDTMgr.NeedUpdate()
WAIT WINDOW "Refreshing Structures ..." NOWAIT
oMeta.oSDTMgr.Update()
ENDIF

WAIT CLEAR

RETURN .T.


If you have a file named "UPDATE.TXT" in your program-directory your structures are controlled and if necessary updated, otherwise the program starts without that check.

I hope that these few lines will help you.

Franz


>I am curious about how & when developers call the StoneField NEEDUPDATE / UPDATE functions in their app when new tables/fields are added to the database. (same with REINDEX - when and where?)
>
>I see postings where users hang an UPDATE DATABASE option off the menu. I would think its needed at app startup time. I am sure users would run an option in an updated EXE that references a new field or new table BEFORE the UPDATE process had been run.
>
>Are there reasons why i would NOT want to fire NEEDUPDATE/UPDATE at app startup?
>
>Also, being "userguide-challenged", can anyone forward example code they have for calling NEEDUPDATE/UPDATE at app startup - particularly in a MAXFRAME environment?? (what class/method is best to call it from?) I have read and re-read drew's comments (and Doug's) but i must be missing something. I'm sure its not operator error :)
>
>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform