Visualizzazione dei risultati da 1 a 4 su 4

Discussione: Programmazione ADO

  1. #1

    Programmazione ADO

    Ragazzi,
    sono un tipo che ha sempre utilizzatro in Vb Dao con la proprietà SEEK per le ricerche, ora vorrei passare ad ADO solo che la SEEK non mi funziona; è strano però perchè sul recordset, c'è la proprietà SEEk, solo che l'errore che mi dà è " il provider corrente non supporta l'interfaccia necessaria per la funzionalità index" io uso oledb 4.0 come provider e come riferimento le librerie di ADO 2.5 o 2.1,

    Il fatto bello è che quando per esempio faccio:

    rs.seek, mi dà come valori da inserire keyvalues e adseekbefore o adseekafterEQ o adseekafter o adseekfirstEQ o adseeklastEQ,

    quindi secondo me si può utilizzare benessimo ilo metodo seek con ado solo che non riesco a trovare il modo giusto.

    Mi potete dare una mano?

    Ciao a tutti

  2. #2
    Utente di HTML.it L'avatar di sebamix
    Registrato dal
    Aug 2000
    Messaggi
    1,028
    Da MSDN:
    [...]
    Remarks
    Use the Seek method in conjunction with the Index property if the underlying provider supports indexes on the Recordset object. Use the Supports(adSeek) method to determine whether the underlying provider supports Seek, and the Supports(adIndex) method to determine whether the provider supports indexes. (For example, the OLE DB Provider for Microsoft Jet supports Seek and Index.)
    [...]
    This method is supported only with server-side cursors. Seek is not supported when the Recordset object's CursorLocation property value is adUseClient.

    This method can only be used when the Recordset object has been opened with a CommandTypeEnum value of adCmdTableDirect.
    [...]


  3. #3
    Utente bannato
    Registrato dal
    Jan 2002
    Messaggi
    413
    Aniché seek prova con find

  4. #4
    Utente di HTML.it L'avatar di JamesD
    Registrato dal
    Oct 2001
    Messaggi
    415
    [supersaibal]Originariamente inviato da ivano_76
    Aniché seek prova con find
    [/supersaibal]
    Dipende dalla quantità di dati in cui deve ricercare, perchè se ha venti record e devi fare una rierca sola è un conto, ma se i record diventano 100000 e le ricerche diventano centinaia tutte in successione usare find risulta molto più lento.

    Se la lentezza non è un problema però find è un ottimo sostituto!!

    Ciaoz

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.