|
Removes an index from the current Pervasive 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.
object. DdfDropIndexMaintain keynum
The DdfDropIndexMaintain method syntax has these parts:
|
Part
|
Description
|
|---|---|
|
object
|
Required. The name of a valid VAccess control.
|
|
keynum
|
Required. Integer representing the ordinal number of the key to be dropped from the file.
|
DdfDropIndexMaintain returns a two-byte integer that holds the status of the VAccess control. If this is zero, the operation completed successfully.
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.
'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
IndexList, RefreshLocations , DdfAddIndex, DdfDropIndex
|
Chapter contents
Prev topic: DdfDropIndex
|