Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Log Problem
Message
 
 
À
19/04/2002 17:07:57
Bill Breay
Custom Business Software
Arvada, Colorado, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00647094
Message ID:
00647899
Vues:
6
>I have upgraded from mm 6.0b to mm vs 7.0. I also upgraded from vfp6.0 to vfp7.0. I am now getting an error when running in the debug mode (haven't tried production mode as yet). When an error occurs the error 'File in Use' appears. It does not make any difference what the error is.
>
>I have traced it to the the new() method of the error routine. The instruction to 'Open id in 0' crashes causing a second error and of cource the errorlog is in use from the first error.
>
>The new() method cannot find the 'id' table. The id table is in the database.
>
>The errorlog is in the database. The checkbox for checking the database in the cerrormgr bizobj is checked per installation instructions. I can validate the database and all tables validate OK.
>
>There is an entry in the id table for the errorlog table.
>
>The database has been compiled and the project rebuilt.
>
>Any ideas of what the problem may be?
>
>TIA
>
>Bill
PROCEDURE WriteLog
    tToday = DATETIME( )
    IF FILE(cLogFileName)                  && Does file exist? 
       gnLogFile = FOPEN(cLogFileName,12)  && If so, open read-write
    ELSE
       gnLogFile = FCREATE(cLogFileName)   && If not, create it
    ENDIF
    IF gnLogFile < 0                       && Check for error opening file
       WAIT 'Cannot open or create LOG REPORT' WINDOW NOWAIT
    ELSE                                   && If no error, write to file
       =FSEEK(gnLogFile,0,2)               && goto EOF
       =FWRITE(gnLogFile, gLogMESS)
       IF lLineComplete
           =FPUT(gnLogFile, " Today "+TTOC(tToday))
       ENDIF
    ENDIF
    =FCLOSE(gnLogFile)                     && Close file
ENDPROC

...
    gLogMESS= "  "+ lcTarget + " -mf-> "+ lcRemoteMFile
    Do WriteLog
Be sure to always close your err or log file after writing to it :~)

Ed B
Edgar L. Bolton, B.S. B.B.A.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform