The Table_CreateIndexes() function creates the indexes for the specified table on a data source.


Table_CreateIndexes(product_ID, table table_name)


product_ID – An integer specifying the product ID of the dictionary containing the table for which indexes are being created.

table table_name The table for which indexes are being created.

Return value

An integer indicating whether indexes were created. The result is 0 if the indexes were created successfully. Any other value indicates indexes could not be created.


If you have altered the indexes for tables on the data source, you can use this function to re-create the indexes for tables in your application.

Before you use the Table_CreateIndexes() function, the table must not have any indexes (including primary key constraints) that have the same names as those created by Dexterity. If any indexes with these names exist for the table, the Table_CreateIndexes() function will fail.

If you will be using bulk copy (bcp) to copy data to your application’s SQL tables, you may want to drop all indexes for the tables you’re copying data to. By removing the indexes, the bulk copy operations can be performed much faster. Once all of the data has been copied, use the Table_CreateIndexes() function to re-create the indexes for the tables.

Keep in mind that creating indexes for a large data set can take a considerable amount of time.

Documentation Feedback