Optimize Property-Dynamic (ADO)
Specifies whether an index should be created on a field.
Settings and Return Values
Sets or returns a Boolean value that indicates whether an index should be created.
Remarks
An index can improve the performance of operations that find or sort values in a Recordset. The index is internal to ADO; you cannot explicitly access or use it in your application.
To create an index on a field, set the Optimize property to True. To delete the index, set this property to False.
Optimize is a dynamic property appended to the Field object Properties collection when the CursorLocation property is set to adUseClient.
Usage
Dim rs As New Recordset
Dim fld As Field
rs.CursorLocation = adUseClient 'Enable index creation
rs.Fields.Append "Field1", adChar, 35, adFldIsNullable
rs.Open
Set fld = rs.Fields(0)
fld.Properties("Optimize") = True 'Create an index
fld.Properties("Optimize") = False 'Delete an index
Applies To
See Also
Optimize Property Example (VB)
Optimize Property Example (VC++)
Filter Property
Find Method (ADO)
Sort Property
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για