Adding an Index
To add an index, the same programmatic logic is followed. Create an
IndexDescriptor with the com.sun.star.sdbcx.XDataDescriptorFactory interface from the index container. Then follow the same steps as for the table. Next, append the columns to be indexed.
Note that only an index can be added to an existing table. It is not possible to add an index to a
The task is completed when the index object is added to the index container, unless the
append() method throws an com.sun.star.sdbc.SQLException. This may happen when adding a unique index on a column that already contains values that are not unique.
|Content on this page is licensed under the Public Documentation License (PDL).|