DdfDropIndexMaintain
Applies to
VAccess
Description
Removes an index from the current PSQL data file. If RefreshLocations is True, it removes it from the data dictionary definition for the current table without re-ordering the existing indexes.
Syntax
object. DdfDropIndexMaintain keynum
The DdfDropIndexMaintain method syntax has these parts:
 
Return Value
DdfDropIndexMaintain returns a two-byte integer that holds the status of the VAccess control. If this is zero, the operation completed successfully.
Remarks
DdfDropIndexMaintain will drop the specified index from the actual data file itself. In addition, this function will remove the index from the metadata memory image of the VAccess control. If RefreshLocations is True, DdfDropIndex will then update the DDF files themselves to match the current memory image. If DdfTransactionMode is True, these actions will be performed inside a transaction.
Unlike DdfDropIndex, DdfDropIndexMaintain will not change the ordinal values of any other existing keys. Only applications which might use the dropped key will be adversely affected.
DdfDropIndexMaintain can be very dangerous if used incorrectly, since it alters the index structure of the data file itself. Existing programs which use the data file may no longer work after this operation is performed. Use with extreme caution.
Example
'kill only applications that use index #1
status = VANew.DdfDropIndexMaintain(1)
If status > 0 Then
errorMsg = "Error occurred during Drop Index " + _
CStr(i) + " operation. Btrieve status " + _
CStr(status) + ". "
MsgBox errorMsg, vbExclamation
End If
See Also
IndexList, RefreshLocations , DdfAddIndex, DdfDropIndex