>Dear Experts
>
>For error handling I wrote following procedure in my main prg
>
>ON ERROR DO ERRHAND WITH ;
> ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
>
>PROCEDURE ERRHAND
>PARAMETER MERROR, Mess, MESS1, MPROG, MLINENO
>MESSAGEBOX('Error number: ' + Ltrim(Str(MERROR)) + Chr(13) + ;
> 'ERROR MESSAGE: ' + Mess + Chr(13) + ;
> 'LINE OF CODE WITH ERROR: ' + MESS1 + Chr(13) + ;
> 'LINE NUMBER OF ERROR: ' + Ltrim(Str(MLINENO)) + Chr(13) + ;
> 'PROGRAM WITH ERROR: ' + MPROG, ;
> 48, _SCREEN.CAPTION)
>
>But when some error occours, a screen appears as
>
>Programm Error
>File "errhand.prg" does not exist.
>
>This dialoge box contains three button: cancel - Ignore - Help
>By pressing Cancel or Ignore button this dialog box appears again and again.
>Then I have to terminate my Exe from Task Manager by pressing ALT+CTRL+Del.
>As a result some dbf got corruption.
>
>What should I do to avoid such situation.
Try to add SET PROCEDURE TO MAIN.prg in your main program.
If it's not broken, fix it until it is.
My Blog