Sample CreateIndex
<< Click to Display Table of Contents >>
Sample CreateIndex
|
|
Purpose
CreateIndex sample
Description
This sample shows how you can create & delete Indexes for an open file
Example(s)
LOCAL oSrv AS BtDDFServer
oSrv := BtDDFServer"F:","Customers","F:",BFM_Exclusive
? "# Orders, # recs",oSrv:OrderInfo(DBOI_ORDERCOUNT), oSrv:RecCount
? "Creating Index:"
// Create index:
// D Descending
// m not more segments
// N Nulls allowed
// q not Unique
// s not Static
// u not Case Sensitive
// xxxx5xxxx0xxxx5xxxx0xxxx5xxxx0xx
? oSrv:CreateIndex("City XX DmNqsu;"), Bt_ErrorMsg()
? " # Orders",oSrv:OrderInfo(DBOI_ORDERCOUNT)
? "Deleting index:"
? oSrv:DeleteIndex(oSrv:OrderInfo(DBOI_ORDERCOUNT)), Bt_ErrorMsg(), Bt_Error()
? " # Orders", oSrv:OrderInfo(DBOI_ORDERCOUNT)
oSrv:Close()
wait