Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316

    Unanswered: Assign Access query to an ADO recordset?

    Is it possible to load an Access query into an ADO recordset? Many thanks for any help.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Yes. It is possible ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    How is it done? I can't find any examples on the net.

  4. #4
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Code:
    Dim rs As New Adodb.Recordset
    Dim strSql as String
    strSql="Select field1 from table1"
    rs.open strSql,YourConnection
    ...
    Inspiration Through Fermentation

  5. #5
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    In your help file - search for Open Method (Ado Recordset).
    It gives a good explanation and example
    Inspiration Through Fermentation

  6. #6
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    I needed to know how to assign an Access query to an ADO rs, not an SQL query string. Here's what I eventually found:

    Open Access Query into an ADO rs
    Code:
    rs.Open "qryMyQuery", cnn, adOpenStatic, adLockReadOnly, adCmdStoredProc
    Open Access Table into an ADO rs
    Code:
    rs.Open "tblMyTable", cnn, adOpenStatic, adLockReadOnly, adCmdTable

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •