I tryed with FW_CdxCreate(,.t.) .
Yes, this is the right way.
This creates index tags on all columns in a temporary index. This index will be removed after the dbf is closed. Useful for autosort.
- Code: Select all Expand view RUN
function TempTest()
local oDlg, oBrw
USE CUSTOMER SHARED NEW VIA "DBFCDX"
FW_CdxCreate( nil, .t. ) // create temporary index
DEFINE DIALOG oDlg SIZE 700,400 PIXEL TRUEPIXEL
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "CUSTOMER" AUTOCOLS AUTOSORT ;
CELL LINES NOBORDER
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
return nil
FW_CdxCreate( [cFieldList], [lMemory] )
You can create index on one or more fields by specifying the list of fields in the first parameter. Default is all fields.
If lMemory is .t., a temporary index is created in memory. By default, it creates a normal index on the disk and we need to open the dbf in exclusive mode.