General information
Category:
The Mere Mortals Framework
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only