lparameters tcTableName, tcCommandStr local lcOldError, llError, lcTag lcOldError=on('error') on error llError=.t. * invoke the ALTER TABLE – SQL Command with &-macro expanded tail alter table (m.tcTableName) &tcCommandStr novalidate do while m.llError and oValid.lContinue release laError =aerror(laError) if laError[1,1] = 1531 && cannot alter table because of index lcTag = laError[1,3] set message to 'Deleting tag '+ m.lcTag delete tag (m.lcTag) llError = .f. alter table (m.tcTableName) &tcCommandStr novalidate else exit endif enddo if m.llError ** Exited aerror(laError) =messagebox("Error: " + transform(laError[1,1])+chr(13)+laError[1,2], 48,"Alter table error") endif *set message to ' ' && clear status bar msg. on error &lcOldError return m.llError