Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
QSL against a ADODB.recordset
Message
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Divers
Thread ID:
00492122
Message ID:
00492144
Vues:
25
What do you need exactly? You can use the Filter method or the Find method but you can't SELECT on a recordset.

>How would I query against this on the fly recordset? Its built from a listbox. the listbox items are created from other individual elements.
>
>
>Dim Rs As ADODB.Recordset, aCols As Variant, strMark As String
>
>    Set Rs = New ADODB.Recordset
>    With Rs.Fields ' crreate RSs fields
>        .Append "Office", adBSTR ' Office number
>        .Append "Submit", adBSTR ' Submitted Flag
>        .Append "Descri", adBSTR ' The desc and the sub date
>        Rs.Open ' open our new rs
>
>        ' Create the array to facilitate record entry
>        aCols = Array(.Item(0).Name, .Item(1).Name, .Item(2).Name)
>    End With
>
>    Dim x
>    For x = 0 To oList.ListCount - 1
>        If oList.Selected(x) = True And Mid(oList.List(x), 7, 1) = strMark Then
>
>        Rs.AddNew aCols, Array(Left(oList.List(x), 6), _
>                           IIf((Mid(oList.List(x), 7, 1) = strMark), strMark, " "), _
>                           Right(oList.List(x), Len(oList.List(x)) - 37))
>
>        End If
>    Next
>
>
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform