Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disappearing records

Status
Not open for further replies.

frebev

Programmer
Mar 12, 2003
20
0
0
BE
I know I have posted this thread already but this week it happened again: a record completely disappeared out of a table.

I suppose it must have to do something with a certain sequence of keyboard input.

Ken Levi ?????
 
frebev

It could be just a case of a corrupted index. Delete your index file and try re-indexing your file.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Mike,

when I experienced this the first time, a couple of weeks ago, the first thing I tried was REINDEX: not good.

when browsing without any index on: record simply gone.
browsing with delete on/off: record simply gone

no PACKing happened either.

I'm using VFP5.0 under a W2000 network

it's just crazy ....

frebev

 
frebev

Have you tried deleting the index file (.cdx) as I suggested.

when browsing without any index on: record simply gone.

When your are using a compound index (.cdx) file, the index get automatically opened when you opne the table...unless you are using an .idx file.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Frebev,

By the way I think... by Ken Levi you are referencing MicroSoft KenLevi. Hmmmmmmm..........

The problem could be because of buffers, and the table appears to be updated, but the record is lost. In technic this is possible, if the write behind is enabled and the records are in the buffer. If the computer reboots, the buffer is lost. OR even a DLL error or some such funny error from OS can make the buffer to loose your data.

The resolution is .. after every write into tables, get into a habit of issuing the command.. FLUSH. This will ensure that everything is written to disk.

:)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
Mike,

.CDX but I closed the index (set index to)

Ramani,

the record has been in use for more than a year, so no buffering problem

it remains a mistery to me ... (and I am programming in Fox since 1985 ....)

therefore I hope that Ken Levi reads this, or if anyone can give me his e-mail address ?

frebev
 
frebev

CDX but I closed the index (set index to)


Read the help files:

Issuing SET INDEX TO without additional arguments closes all open index files (except a structural .cdx file) in the current work area.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
VFP5.0
I have noticed the same issue. On occasion, without any known sequence of keypress or other specific known user activity, one or in some cases many records were lost completely. Anytime the program is started, I check and on error, (index does not match table), automatically delete and recreate all associated index files but the records are indeed gone and must be re-entered by user. I have not tried Ramani's suggestion of using FLUSH but certainly will look into it. The real problem I encountered was in not being able to reproduce the 'deleting records' event here in the development environment.
Where should I put the FLUSH? Behind every table update?

Thanks for the information.

George

PS The user has reported other 'strange' events with the OS sometimes locking up etc. Suspected that may have been related but didn't know how to relate the two things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top