Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stonefield
Message
De
02/07/1999 15:15:54
 
 
À
02/07/1999 14:17:04
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00236971
Message ID:
00236998
Vues:
11
>I'm having a problem with the needupdate function. My application successully instantiates Stonefield, but the NeedUpdate() function can't find a database to update, even though the stonefield object opens and sets my database before calling the function.
>
>It's almost as if the database is closed when oMeta calls SDTmgr object. There are no errors returned, but nothing gets updated, even though I know there should be tables updated. Anybody seen this behavior?

I found the problem. Kevin, you need to change your code:

*------------------------------------------------
*--- If specified to do so, check file structures
*------------------------------------------------
IF This.OpenDefaultDatabase()
IF This.lStartupCheck AND This.Parent.oMeta.oSDTMgr.NeedUpdate()
This.Parent.oMeta.oSDTMgr.Update()
ENDIF
This.CloseDefaultDatabase()
ENDIF

A better approach is:

*------------------------------------------------
*--- If specified to do so, check file structures
*------------------------------------------------
IF This.lStartupCheck AND ;
This.Parent.oMeta.oSDTMgr.OpenData(This.cDELoader.oDataEnvironment.cDefaultDatabase)
IF This.Parent.oMeta.oSDTMgr.NeedUpdate()
This.Parent.oMeta.oSDTMgr.Update()
ENDIF
ENDIF

Let Stonefield handle the datasession from start to finish. It is much cleaner that way.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform