Re: Lost INDEX files
Posted in 1996
The original question is solved but for the record: > cdr@xteam.co.at (Christian Drauch) writes: > I mean you are using SE - what you have done is correct. Maybe you '.dat' > file is broken too. Check the number of records: > > wc -l file.dat This doesn't work - in general: It is true that SE has a line feed character at the end of every row so this might have worked. It does if there are no deleted rows (which replace the line feed with a byte containing binary 0) and no data whose representation is the same code as a line feed (some values of smallint, integer, float). I once had C-programs that could count records and even fix a broken table. I no longer have these, but they aren't hard to write. You need a parameter telling it the record length which is most easy to figure out via a hex-dump of the table looking manually for the line feeds. > You will get the number of records ( = lines). Then build a new '.idx' file > via 'bcheck -s file'. Last message line from bcheck reports: > > x index node(s) used, y free -- zzz data record(s) used, ? free. > > If this two numbers are identical, your new '.idx' file should be fine. > If not, I would imagine that the '.dat' file is faulty. Nils.Myklebust@ccmail.telemax.no NM-data, Aasesvei 71, 1300 Sandvika, Norway My opinions are those of my company