On Sat, 11 Oct 2008, Mindaugas Kavaliauskas wrote: Hi Mindaugas,
> > I've also had a problem like this. I've implemented some universal > interface to access SQL databases. It's done via RDD, but class interface > can be implemented also. I have implemented SQLBASE, SQLMIX (see below) > RDDs and SDD (see below) for accessing MySQL, FireBird and PostgreSQL. But > only MySQL SDD I've used in real application, so other implementation could > be not complete. > I've tried to document my idea some time ago (2007-10-09). Some > implementation details could be changed general idea is the same. [...] very nice. > It is not guaranteed that all records are included! Yes! If key value of the > first record in index is changed to be the last record in index during the > phase of record processing, DO WHILE ! EOF() loop will iterate only this > single records even if the database contains millions of records. Your sould > do FLOCK() on DBF to guarantee the records are not changed. Do you use > FLOCK() > before readonly DO WHILE ! EOF() loops? :) Sometimes when I have to eliminate such potential race condition but I rather use my own additional locking mechanism which supports share (readonly) locks not directly FLOCK. O.T.: I can add to DBF* RDDs support for phantom locks so additionally to normal locks it's possible to use phantom locks which are not obligatory and dedicated only for application synchronization. RDD does not use them internally though on some platforms like Win9x or DOS they will not be fully functional. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour