ANNOUNCE RDDSYS
FUNCTION MAIN
USE i_201003
? seconds()
INDEX ON field->ref TAG REF TO marco
? seconds()
? seconds()
INDEX ON ref TAG REF TO marco temporary
? seconds()
RETURN NIL
INIT PROCEDURE RddInit
REQUEST DBFFPT
REQUEST DBFCDX
rddSetDefault( "DBFCDX" )
Maurizio wrote:Marco
have you tried
INDEX ON ref TAG REF TO TEMP TEMPORARY ?
Maurizio
// this needs to be in your main.prg
REQUEST DBFCDX
rddsetdefault( "DBFCDX" )
Local FundDbf,dbf_stru
// create a temp file name off the root of the Default Folder
xVol := set(7)
DO WHILE .T.
FundDbf := "TEMP"+(SUBSTR(TIME(),7,2)+SUBSTR(TIME(),4,2))+".DBF"
IF .not. FILE( xVOL+"\DBTMP\"+FUNDDBF )
EXIT
ENDIF
ENDDO
DBF_STRU := { }
AADD( DBF_STRU, { "DESC", "C", 40, 0 } )
AADD( DBF_STRU, { "AMOUNT", "N", 8, 2 } )
AADD( DBF_STRU, { "FUNDED", "N", 8, 2 } )
AADD( DBF_STRU, { "BOX", "N", 2, 0 } )
AADD( DBF_STRU, { "CLASCODE", "C", 10, 0 } )
DBCREATE( xVOL+"\DBTMP\"+FUNDDBF, DBF_STRU )
SELECT 9
Use ( xVOL+"\DBTMP\"+FUNDDBF ) via "DBFCDX" EXCL
Index on ClasCode Tag ClasCode // creates .cdx of the same database name
ELSE
CLose Databases
RETURN(.F.)
ENDIF
..
do your own data processing here
..
Close Databases
Ferase( "Tempxxxx.Dbf" )
Ferase( "Tempxxxx.Cdx" )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 95 guests