I have a database where multiple users enter data into it. Sometimes the index detaches itself from the database and I couldn't figure out why. Please help! I use FP for DOS 2.5
I'm talking about the CDX file. What happened is that the CDX file still exist, but it detaches itself from the dbf. When that happens, I associate the dbf with the index and then reindex it. But it happens quite frequently these days. We have multiple users enter directly into the browse window. There's no fancy application.
Do you have any process that copies the data file, then copies or renames it back? For example:
[tt]use mytable && has a cdx
copy to temp && oops! didn't use "with cdx"
use temp
copy to mytable && cdx might still be physically there
&& but it is no longer "connected"
[/tt]
Yes, I do have a program that makes a copy of a database. The users run this program everyday but it doesn't disconnect the cdx on a daily basis. It only happens sometimes (more frequently lately).
I'm attaching the program below...
Thanks alot for your help!
==================================================
clear all
clear
set safety off
set deleted on
text
This program will print registrations for Accounting since <<begin_date>>.
If you have a printer jam or the accounting reports don't print properly, DO NOT re-run the program.
Registration data that is printed will be saved in REG_DBF.SAVE. If the
accounting report doesn't print properly, you can bring the data back
from the saved file.
The accounting reports will be printed on the LaserJet printer of your choice.
You can press <Esc> and cancel this program at any time.
endtext
wait
clear
* Get start dates for printing accounting report
beg_date = date()
ready = .f.
do while not ready
@ 10, 1 say 'Start Date for printing accounting report:' get beg_date
@ 13,1 say 'Ready to run (Y/N)?' get ready picture 'Y'
read
if readkey() = 12 or readkey() = 268
return
endif
enddo
select (select(1))
use COURSE.DBF
SET ORDER TO DEPT
select (select(1))
use CURREG.DBF
SET RELATION TO DEPT+course_no+section+quarter INTO COURSE
* TO PRINT OUT 2 COPIES OF ACCOUNTING REPORT.
REPORT FORM ACCOUNT.FRX to print for entry_date >= beg_date ;
and not ACCT_PRINT
REPORT FORM ACCOUNT.FRX to print for entry_date >= beg_date ;
and not ACCT_PRINT
* Backup copy of registrations printed today.
copy to reg_dbf.sav for entry_date >= beg_date and not ACCT_PRINT
* Update print flags/date in CURREG.DBF.
replace all ACCT_DATE with date(), ACCT_PRINT with .T. for entry_date >= beg_date
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.