The new code added in 6.1 to "Cancel any pending changes which were not explicitly saved." is causing problems when "This.cAlias" is no longer open. I cannot explain to you why sometimes the table is no longer open when this method is reached but if you look in cdataenv.prg under the procedure closetables() they also have code in there to handle if the tables were no longer open. This problem only occured for me on a somewhat complex form that had 8 business objects on it. The following changes, added to ibizness fixed the problem.
* ibizobj::Releasedataenvironment * SC - crashing when this.cAlias is not open NODEFAULT
LOCAL lnSelect lnSelect = SELECT(0)
* SC - 01/21/01 - added IF TYPE('This.cAlias') = 'C' AND ! EMPTY(This.cAlias) IF USED(This.cAlias) * Original code *** EGL: 10/03/2000 - Cancel any pending changes which were not explicitly saved. SELECT (This.cAlias) This.oBehavior.Cancel(.T.) * Original code ENDIF ENDIF * SC
IF TYPE("This.oDataEnvironment.Name") == "C" This.oDataEnvironment.Release() ENDIF
SELECT (lnSelect)
RETURN
Scott Cunningham Oginali Productions ©2001 Scott Cunningham |