Dear Mr. Rao,
how can we use AUTOSORT with dbf files which do not have indexes.
Should we create for every field an index.
I tryed with FW_CdxCreate(,.t.) .
Is this the right way or is there an ad hoc indexing way. Only for one column.
Thank you in advance
Otto
AUTOSORT xBrowse
AUTOSORT xBrowse
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
********************************************************************
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: AUTOSORT xBrowse
Yes, this is the right way.I tryed with FW_CdxCreate(,.t.) .
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
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
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.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India