That's close but you would use DODEFAULT() or CTRAPP::SETUPTABLES instead of the function call because you are putting this code in the SetUpTables method of your application object subclass.
IF !CTRAPP.SETUPTABLES()
IF TYPE("oMeta") = "O"
lRepair = oMeta.Repair("ALL")
IF ! lRepair
RETURN .f.
ELSE
IF CTRAPP.SETUPTABLES()
RETURN .t.
ELSE
RETURN .f.
ENDIF
ENDIF
ENDIF
ENDIF
>Larry:
>
>thanks for the help.
>
>Would you typically call REPAIR with an "ALL" clause if the SETUPTABLES failed? I have not poured over VMPs setuptable code that much. Where would you place code to make a follow up call to SETUPTABLES? Does something like the following make sense?
>
>IF ! SETUPTABLES()
> IF TYPE("oMeta") = "O"
> lRepair = oMeta.Repair("ALL")
> IF ! lRepair
> *--- tell user tables have problems
> RETURN .f.
> ELSE
> IF SETUPTABLES()
> *---
> ELSE
> *--- couldnt open after repair;
> *--- tell 'em
> RETURN .f.
> ENDIF
> ENDIF
> ENDIF
>ENDIF
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao