Index file 
Author Message
 Index file

Quote:

> Hello!

> I have developed a multi-user accounting system. In the system an option
> has, to index the database files. While a user use the system, From my
> station I cannot index the database file. When indexing the file an open
> error displayed.

> Please advise a methord to avoid this error.

> Best regards
> Shifan.

You can't reindex a file in nin-exclusive mode. You create an index to
your own machine in a temp index is required...


Sat, 09 Sep 2000 03:00:00 GMT  
 Index file

Hello!

I have developed a multi-user accounting system. In the system an option
has, to index the database files. While a user use the system, From my
station I cannot index the database file. When indexing the file an open
error displayed.

Please advise a methord to avoid this error.

Best regards
Shifan.



Sun, 10 Sep 2000 03:00:00 GMT  
 Index file


Quote:
>... While a user use the system, From my
> station I cannot index the database file. When indexing the file an open
> error displayed.

> Please advise a methord to avoid this error.

   If you need to create an index, you must be the ONLY user on the system
to have the file open.  In other words, all other users must be out of the
program segment in which the particular database file is used.  Then, you
must be sure to open the file in EXCLUSIVE mode.
   Reindexing files, unless it's necessary due to corruption, is best done
after-hours.

Paul Van House



Sun, 10 Sep 2000 03:00:00 GMT  
 Index file

Quote:

> Hello!

> I have developed a multi-user accounting system. In the system an option
> has, to index the database files. While a user use the system, From my
> station I cannot index the database file. When indexing the file an open
> error displayed.

> Please advise a methord to avoid this error.

> Best regards
> Shifan.

Shifan,

You can redefine the error handler in clipper to see if you can open the
files in exclusive mode.  If you can't you can trap the error and display
a message stating you can't perform this function at this time.

   bOldErrorHandler := ERRORBLOCK()
   bSaveHandler     := ERRORBLOCK( { | x | BREAK( x ) } )

   BEGIN SEQUENCE
      /* OPEN INVENTRY FILE WORKAREA */
      /* Try to Open all your Files Exclusive */
      DBUSEAREA( .T., "DBFCDX", "INVENTRY", "INVENTRY", .F., .F. )
      DBSETINDEX( "INVENTRY" )
      DBSETINDEX( "ITEMNAME" )
      DBUSEAREA( .T., "DBFCDX", "TAXTABLE", "TAXTABLE", .F., .F. )
      DBSETINDEX( "TAXTABLE" )
      DBUSEAREA( .T., "DBFCDX", "CASHIER", "CASHIER", .F., .F. )
      DBSETINDEX( "CASHIER" )
      DBUSEAREA( .T., "DBFCDX", "CLASS", "CLASS", .F., .F. )
      DBSETINDEX( "CLASS" )
      DBUSEAREA( .T., "DBFCDX", "CLASS2", "CLASS2", .F., .F. )
      DBSETINDEX( "CLASS2" )

   RECOVER USING oError
      IF ( oError:genCode == EG_OPEN )
         HMESSAGE( 10, 19, 15, 61, "GR+/R", ;
                   "FILE IN USE BY ANOTHER USER!", "CANCEL", ;
                   NIL, NIL, NIL, .F. )
      ENDIF
      DBCLOSEALL()

      // Restore the default error handler
      ERRORBLOCK( bOldErrorHandler )

      RETURN ( NIL )
   END



Sun, 10 Sep 2000 03:00:00 GMT  
 Index file


Quote:

> I have developed a multi-user accounting system. In the system an option
> has, to index the database files. While a user use the system, From my
> station I cannot index the database file. When indexing the file an open
> error displayed.

> Please advise a methord to avoid this error.

> Best regards
> Shifan.

You have to open the file in exclusive mode.


Sun, 10 Sep 2000 03:00:00 GMT  
 Index file

Quote:


> >... While a user use the system, From my
> > station I cannot index the database file. When indexing the file an >
> open error displayed.

> > Please advise a methord to avoid this error.
>    If you need to create an index, you must be the ONLY user on the
> system to have the file open.  In other words, all other users must be
> out of the program segment in which the particular database file is
> used.  Then, you must be sure to open the file in EXCLUSIVE mode.
>    Reindexing files, unless it's necessary due to corruption, is best
> done after-hours.

> Paul Van HouseShifan,

I wrote a simple stand-alone .EXE that waits until 11:30pm (hopefully,
when everybody is gone), and then re-indexes all the files.
Works great!  Not more interruptions or conflicts!


Tue, 12 Sep 2000 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. CDX Index file bloats up but shrink after re-indexing

2. Update an INDEXED FILE using SEQ FILE

3. indexed file format and data files- for cobol compilers

4. Indexed Files

5. clipper5 index files

6. Index files??

7. Clarion makes bad cdx index files, why?

8. Re-Index files

9. Index file corrupdet

10. Clipper NTX and Index file size ????

11. Index files source, Help.

12. Using aliases in index files

 

 
Powered by phpBB® Forum Software