PreviousDTI Programmer's Guide (9.1 revision 1) Next

PvAddIndex()

Show this topic in Library frames

Adds indexes specified in indexList to the existing table and to the underlying data file.

Header file: DDF.H
Requires: W3DBAV75.DLL or higher version

Syntax

PRESULT PvAddIndex( 
	WORD            dictHandle, 
	LPCSTR          tableName, 
	INDEXMAP*       indexList, 
	WORD            indexCount); 

Arguments

In
dictHandle
Handle of an open dictionary returned by PvOpenDictionary().
In
tableName
Name of the table where the indexes will be added.
In
indexList
Array of index definitions.
In
indexCount
Number of indexes in the indexList array.

Return Values

PCM_Success
The operation completed successfully
PCM_errFailed
The operation did not complete successfully
PCM_errInvalidDictionaryHandle
The specified dictionary handle does not exist
PCM_errTableNotFound
The specified table was not found
PCM_errMemoryAllocation
An error occurred during memory allocation
PCM_errInvalidIndexName
The specified index name is invalid.
PCM_errColumnNotFound
The specified column was not found in the table.

Remarks

You must first open a dictionary successfully using PvOpenDictionary().

The table specified by tableName must exist in the dictionary specified by dictHandle.

You will need to allocate and release INDEXMAP array used to describe the indexes (see memory management module).

See Also

PvStart()
PvOpenDictionary()
PvDropIndex()
PvDropIndexByName()
PvCloseDictionary()
PvStop()


Chapter contents
Publication contents

Prev topic: DTI Function Definitions
Next topic: PvAddLicense()