Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stonefield
Message
From
02/07/1999 15:15:54
 
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00236971
Message ID:
00236998
Views:
10
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform