CreateIndex - method of the PmaDatabase object
Description:
Creates the index over the column of the database table.
Syntax:
Boolean CreateIndex(String sName, String sField, Boolean bDesc, Boolean bPrima, Boolean bUnique, Boolean bIgnoreNulls, Boolean bRequiered)
Parameters:
| sName | (String) Index name |
| sField | (String) Column name over which the index is defined. |
| bDesc | (Boolean) Sorting type:
true - from Z to A
false - from A to Z |
| bPrima | (Boolean) Index is defined as the primary key |
| bUnique | (Boolean) Duplicate values are not allowed in the "sField" column |
| bIgnoreNulls | (Boolean) In the created index the records that have set the Null value, will be excluded. |
| bRequiered | (Boolean) Values <Null> are not allowed in the "sField" column (the value must be always set up) |
|---|
Note:
By repeating the method more indexed files can be created.
This method
is not functional if the "
Technology" configurator is set to
Access through ODBC.
Example1:
JavaScriptVBScriptSelect and copy to clipboard
var bCreateIndex = oDb.CreateIndex("PK_date", "datecol", 0, 1, 1, 1, 1);
Dim bCreateIndex
bCreateIndex = oDb.CreateIndex("PK_date", "datecol", 0, 1, 1, 1, 1)
Example2:
See the example in the description of the
Create method