assert alias()=="DOKSUMMA" Mess "Select has lost it's alias - Debug Time!">
>function FixCursorAlias(tcAlias) >*-- expects to be called on the workarea in question >*-- or add a second workarea parameter >tcAlias = upper(alltrim(m.tcAlias)) >if alias()==m.tcAlias > = strToFile(Transform(select()) + m.tcAlias + "!=" + Alias() + "$$$" + dbf(), "AliasErr.txt") > local lnOldArea, lnNewArea, lcDbf > lcDbf = dbf() > lnOldArea = select() > * Since we had an error, be extra careful and > * do everything here slowly with one line for each operation > select 0 > use (m.lcDBF) again alias (m.tcAlias) > Do While !alias()==m.tcAlias > DoEvents && add other stuff here, perhaps more protocol > use (m.lcDBF) again alias (m.tcAlias) > enddo > lnNewArea = select() > select (m.lnOldArea) > use > select (m.lnNewArea) >endifThomas,
IF !USED('DOKSUMMA') MESSAGEBOX( 'Please try this command again' ) RETURN .F. ENDIFbefore the lines where this error must frequently occurs. Those places can be determined by line numbers from log file if exe is created with a debuf info.