Mike, The following is from the rbhelp file: "The following section contains information about using AUTOCHK in application files and capturing the error variables returned. This allows the application developer to prevent users from continuing to use a corrupted database.
SET ERROR VAR E1 WRITE �Checking database for errors...� AUTOCHK dbname IF E1 > 40 THEN WRITE �AUTOCHK has found errors in the database!� BEEP ENDIF If E1 > 0 and E1 < 50 THEN WRITE �AUTOCHK will not run - User Abort or Out of Memory� BEEP ENDIF IF E1 = 0 THEN WRITE �AUTOCHK successful - No errors found� ENDIF PAUSE 2 RETURN You can find a more detailed discussion at www.rsyntax.com -- Jim Bentley American Celiac Society [EMAIL PROTECTED] - email (973) 325-8837 voice (973) 669-8808 Fax ---- Ramsour Mike <[EMAIL PROTECTED]> wrote: > I am apparently misusing or incorrectly using the error variable. > Is there > some way to check the results of the AUTOCHK program other than > checking an > error variable? My intent is to make sure that AUTOCHK didn't > find any > errors. > > Thanks for the feedback. > > Mike > > -----Original Message----- > From: Alastair Burr [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 01, 2002 2:15 PM > To: [EMAIL PROTECTED] > Subject: Re: Database issue > > > > > > > I think that your first error check is in the wrong place - > all it's telling > you at the moment is that the CLS gave no error. > > If you move it between the AUTOCHK line and the OUTPUT SCREEN > line you > should get what you want. > > Regards, > Alastair. > > > > > > ----- Original Message ----- > From: "Ramsour Mike" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, August 01, 2002 4:50 PM > Subject: Database issue > > > > Part of a routine that I do each day is to reload my database, > run AUTOCHK > > on it and if everything comes out OK I then copy the database > to a network > > share for my users. During this morning's run I encountered > a problem > where > > the RB2 did not get entirely reloaded and none of the indices > were rebuilt > > but AUTOCHK apparently gave an OK result so that the copy > took place. > > > > Here is the code that I use: > > > > DISCONNECT > > -- > > CLEAR ALL VAR now > > -- > > SET ERROR VAR vchk_result > > -- > > OUTPUT d:\autoload.$$$ > > -- > > AUTOCHK maindata FULL > > -- > > OUTPUT SCREEN > > -- > > CLS > > -- > > IF vchk_result <> 0 THEN > > -- > > CLS > > -- > > OUTPUT d:\loadrslt.txt > > -- > > WRITE 'Errors encountered during data loading -- aborting' > > -- > > OUTPUT SCREEN > > -- > > GOTO endline > > -- > > ENDIF > > -- > > CONNECT maindata > > -- > > RUN mon_calc.prg > > -- > > RELOAD NEXTDATA > > -- > > DISCONNECT > > -- > > OUTPUT d:\autoreld.$$$ > > -- > > AUTOCHK nextdata FULL > > -- > > OUTPUT SCREEN > > -- > > IF vchk_result = 0 THEN > > -- > > CLS > > -- > > OUTPUT d:\reldrslt.txt > > -- > > WRITE 'Database reload successful' > > -- > > OUTPUT SCREEN > > -- > > DELETE MAINDATA.* > > -- > > RENAME NEXTDATA.* MAINDATA.* > > -- > > COPY MAINDATA.* m:\rbased~1 > > -- > > GOTO endline > > -- > > ELSE > > -- > > CLS > > -- > > OUTPUT d:\reldrslt.txt > > -- > > WRITE 'Errors encountered on database reload' > > -- > > OUTPUT SCREEN > > -- > > GOTO endline > > -- > > ENDIF > > -- > > LABEL endline > > -- > > EXIT > > > > The database files are somewhat large by some measures: > > > > MAINDATA.RB1 169,196 > > MAINDATA.RB2 805,486,492 > > MAINDATA.RB3 201,887,774 > > MAINDATA.RB4 1,126,400 > > > > My concern is that the files are getting too large or that > I have > something > > wrong with my system or possibly the database. If there was > an error in > the > > database then why didn't AUTOCHK catch it? I am running the > latest > version > > of R:Base for Windows on a Windows 2000 PC. Could there be > a problem with > > an index file being that big? > > > > As an aside, will v. 7.0 also be limited to around 2 GB or > will that limit > > be lifted? > > > > Thanks > > > > Mike Ramsour > > AK Steel Coshocton Works > > > > 740-829-4340 > > ================================================ > > TO SEE MESSAGE POSTING GUIDELINES: > > Send a plain text email to [EMAIL PROTECTED] > > In the message body, put just two words: INTRO rbase-l > > ================================================ > > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > > In the message body, put just two words: UNSUBSCRIBE rbase-l > > ================================================ > > TO SEARCH ARCHIVES: > > http://www.mail-archive.com/rbase-l%40sonetmail.com/ > > ================================================ > TO SEE MESSAGE POSTING GUIDELINES: > Send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: INTRO rbase-l > ================================================ > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: UNSUBSCRIBE rbase-l > ================================================ > TO SEARCH ARCHIVES: > http://www.mail-archive.com/rbase-l%40sonetmail.com/ > > ================================================ > TO SEE MESSAGE POSTING GUIDELINES: > Send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: INTRO rbase-l > ================================================ > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: UNSUBSCRIBE rbase-l > ================================================ > TO SEARCH ARCHIVES: > http://www.mail-archive.com/rbase-l%40sonetmail.com/ > ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
