Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does NEEDUPDATE() require exclusive use of table
Message
General information
Forum:
Visual FoxPro
Category:
Stonefield
Miscellaneous
Thread ID:
00489180
Message ID:
00489195
Views:
10
This used to be a problem in an earlier version of SDT. It is fixed in the current version -- 5.1i.

If a table structure does need updating, then yes exclusive use is required to modify the structure of any table. I believe the process in SDT is SDT creates a new table using a temp name using the updated structure [from meta data], appends the data from the old table into the new structure. Then the old table is deleted [dropped from the DBC if necessary] so exclusive use is required of the old table. The new table is renamed to the correct name, added to the DBC if necessary and the indexes, PKs, etc are created.

>Hi all,
>
>Whenever I change any table structures in my application, I also change the structure of a signal table that is checked for NEEDUPDATE() at application startup. If it has been changed, I UPDATE("ALL"). (See code below).
>
>This works pretty well except that sometimes the NEEDUPDATE() returns true even when it is not needed, and this seems to be when the signal table is in use by someone else on the network. Is this the case, that NEEDUPDATE() will return true if a table can't be used exclusively? Are there any other reasons it would return true when in fact the table structure is okay?
>
>I'd like to minimize unneeded UPDATE("ALL") calls.
>
>TIA,
>
>Larry
>-----------------------------------------------------------
>Code follows:
>
> open database dtpadata
> set classlib to DBCXMGR additive
> oMeta = createobject('DBCXMGR')
> oMeta.SetDatabase(dbc())
> if oMeta.oSDTMgr.NeedUpdate('dtpadata!dtpasys') && signal table
> oMeta.oSDTMgr.Update('ALL')
> oMeta.oSDTMgr.Update('!') && does free tables
> endif
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform