TurboDB VCL Component Library Creating a Full-Text Index at Run-Time |
Previous Top Next |
Only new type full-text indexes can be created at run-time, this means the table must have level 4 or higher.
To create a new table with full-text index with the TTdbTable component:
1. | Create a TTdbTable component for the table, you want to create. |
2. | Define all the properties (e.g. FieldDefs) necessary for the new database table. |
3. | Add one TTdbFulltextIndexDef for each full-text index you need to the FulltextIndexDefs property of the table. |
4. | Call the CreateTable method of the TTdbTable component. |
To add a full-text index at run-time with the TTdbTable component:
1. | Create a TTdbTable component for the table, you want to add the full-text index to. |
2. | Call the AddFulltextIndex method, passing the parameters as described in the previous section. |
To add a full-text index at run-time using SQL:
1. | Create a TTdbQuery component and set the SQL text to: CREATE FULLTEXTINDEX ON <Table-Name> DICTIONARY <Dictonary-Table-Name> (<Field1>, <Field2>, <Field3>, ...) |
2. | Call the ExecSQL method of the TTdbQuery component. |
See also
CREATE FULLTEXTINDEX