As someone else noted, you may have a corrupt index file. I would look at getting a tool like Stonefield Database Toolkit that helps you maintain your tables and indexes. In a previous application I worked on, we used it to reindex all the tables every evening when no one else was on the system.
>Answers to your questions:
>
>1.Visual Foxpro 6 sp3
>2.Below is the code a client can call to reindex the ba850pon table.
>Prior to calling the code below we do a DELETE TAG ALL OF on the table.
>*---------------
> INDEX ON linkto850 ;
> TAG linkto850 OF &mold_idx_file
> INDEX ON DTOS(sent_dt)+sent_tm ;
> TAG sent_dt OF &mold_idx_file;
> DESCENDING
> INDEX ON Pon + type ;
> TAG pon OF &mold_idx_file
> INDEX ON p850_key ;
> TAG p850_key OF &mold_idx_file
> INDEX ON pon;
> TAG Cpon FOR type = "850"
> INDEX ON lnln + lnFn;
> TAG Clnln FOR type = "850"
> INDEX ON DTOC(Sent_dt)+Sent_tm;
> TAG CSent DESCENDING FOR type = "850"
> INDEX ON Confirmed +Agent_dept;
> TAG CConfirmed FOR type = "850"
> INDEX ON Linkto850;
> TAG TLinkto850 FOR type = "860"
> ALTER TABLE BA850pon ADD PRIMARY KEY p850_key TAG p850_key
>*-----------------
>
>3.The locate code is used to update the record in the ba850pon table with information received
>
>*----------------
>SELECT ba850pon
>=CURSORSETPROP("Buffering",3,"Ba850Pon")
>SET ORDER TO TAG sent_dt descending
>*--Find the corresponding 850 to get the P850_key&
>* update the Confirm Field
>lc_SeekVal = PADR(m.ts_id_no,22)+"850"
>GOTO TOP
>LOCATE FOR ba850pon.pon + ba850pon.type = lc_SeekVal
>
> IF FOUND()
>
>*----------------
>This is basically the same code we used right after creating the record to try and troubleshoot the problem.
Chris McCandless
Red Sky Software