Metodo di ricerca ADO
❮ Riferimento completo dell'oggetto Recordset
Il metodo Seek cerca nell'indice di un Recordset per trovare un record che corrisponda ai valori specificati nel parametro keyvalues. Se c'è una corrispondenza, il puntatore punterà al record specificato dal parametro seekoption. Se non c'è corrispondenza, il puntatore del record verrà posizionato alla fine del Recordset.
Nota: per utilizzare questo metodo, il provider deve supportare questo metodo e l'uso di indici su un recordset (la proprietà Index). Utilizzare il metodo Supports per determinare se il provider supporta la ricerca e gli indici.
Nota: impostare la proprietà Index sull'indice desiderato prima di eseguire questo metodo.
Nota: questo metodo può essere utilizzato solo con i cursori lato server (non supportato quando il valore della proprietà CursorLocation è adUseClient).
Nota: questo metodo può essere utilizzato solo quando l'oggetto Recordset è stato aperto con il valore CommandTypeEnum di adCmdTableDirect.
Sintassi
recordsetobj.Seek keyvalues,seekoption
Parameter | Description |
---|---|
keyvalues | Required. An array of values to compare with the values in each column |
seekoption | Required. A SeekEnum value that specifies the type of seek |
Cerca valori enum
Constant | Value | Description |
---|---|---|
adSeekFirstEQ | 1 | Seeks the first key equal to keyvalues |
adSeekLastEQ | 2 | Seeks the last key equal to keyvalues |
adSeekAfterEQ | 4 | Seeks either a key equal to keyvalues or just after where that match would have occurred |
adSeekAfter | 8 | Seeks a key just after where a match with keyvalues would have occurred |
adSeekBeforeEQ | 16 | Seeks either a key equal to keyvalues or just before where that match would have occurred |
adSeekBefore | 32 | Seeks a key just before where a match with keyvalues would have occurred |
❮ Riferimento completo dell'oggetto Recordset