use mydbf share via "DBFCDX"
dbInfo( DBI_SHARED, .F. )
set order to 1
skip while .not. eof()
MarcoBoschi wrote:4 Was it related to the network ?
NO
James Bott wrote:Patrizio,The slow performance are due to deleted records but we can't use the INDEX ... FOR !Deleted()
Why can't you?
James
#include "dbinfo.ch"
ANNOUNCE RDDSYS
FUNCTION MAIN
LOCAL nInizio := SECONDS()
SET EXCLUSIVE OFF
USE aala
SET INDEX TO AALA
dbInfo( DBI_SHARED, .F. )
SET ORDER TO 1
DO WHILE !EOF()
// ? field->bol_lav , field->rag_cli
SKIP
ENDDO
? SECONDS() - nInizio
INIT PROCEDURE RddInit
REQUEST DBFFPT
REQUEST DBFCDX
rddSetDefault( "DBFCDX" )
RETURN
The dbf are used by both applications Fivewin and ,Net and the .Net provider doesn't handle well the FOR !Deleted() clause.
James Bott wrote:Patrizio,The dbf are used by both applications Fivewin and ,Net and the .Net provider doesn't handle well the FOR !Deleted() clause.
I would suggest reusing deleted records. Whenever you want to add a new record, first look for a deleted record and if found, use it, otherwise add a new record.
James
It would be nice, but it would be extremely slow to find the first deleted record in a table with more than one million records unless you use a index with FOR Deleted() clause
James Bott wrote:It would be nice, but it would be extremely slow to find the first deleted record in a table with more than one million records unless you use a index with FOR Deleted() clause
Hmm, are you saying you are unable to use any FOR clauses?
Maybe you could create another database containing the record numbers of the deleted records in the main database. When records are reused then you can delete those records. Since this database would be small, you could just search for a record that was not deleted (which would contain the recno of a record that WAS deleted in the main database). Hmm, I hope that wasn't too confusing.
James
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 41 guests