Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move application
Message
 
 
To
05/02/2002 10:08:55
General information
Forum:
Visual FoxPro
Category:
Stonefield
Miscellaneous
Thread ID:
00615344
Message ID:
00615500
Views:
16
>I copied all files from the vfp5 application into another subdir for vfp7. I want no relation between the 2. I got the update.prg to work by sending up the 2 libraries but I didn't remove the code. I'll go back and do that. From the SDT help, it says you can run update.prg from the command window to update everything but this must only be on a development system with a legit copy of SDT. My guess is that I need to move the code in my app's starting prg up some so that it will run update automatically before it tries to access any tables or views in the database, correct?

That is what I do on the tables that are needed to start my apps. I have a table of my own creation where I have listed all the tables that need to be validated when the app launches. The code looks like:
local lnRetVal, lnI, lcTable, llUpdate, laTables[1]
select Table_Name from DATABASE_NAME + "!TableChk" ;
   order by Table_Name into array laTables
for lnI = 1 to alen(laTables, 1)
   lcTable = trim(laTables[lnI, 1])
   if empty(lcTable)
      loop
   endif
   if oMeta.oSDTMgr.NeedUpdate(lcTable)
      llUpdate = .t.
      exit
   endif
endfor
if llUpdate
   lnRetVal = MsgSrvr("Database needs to be updated. Make sure")
   if lnRetVal = IDOK
      SDT_Validate()
   else
      MsgSrvr("Database update cancelled. It is critical that")
   endif
endif
return
>Thanks Mark. You are a great contributor to this forum and I enjoyed your talk on Palm and VFP at Whilfest!

Thanks for the kind words!
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform