Access ADO Help ( 4 Views )

no kitty!
  1. Hello,

    Does anyone know how to access the SQL of a stored query using ADO?

    The DAO way to do it is:

    Dim DB As DAO.Database
    Dim strSQL As String
    Set DB = CurrentDB

    DB.QueryDefs("Some_Query").SQL = strSQL

    DB.Close

    What's the ADO equivalent of this?

    Thanks!

    (can, British Indian Ocean Territory)

  2. I've never tried feeding in the name of a query, but this might work:

    Code:

    Set cn = Application.CurrentProject.Connection
                       
    Set cmd = New ADODB.Command
    With cmd
      .ActiveConnection = cn
        .CommandText = "[Access Query Name Here]"
        .Execute
    End With
                       
    Set cmd = Nothing
    Set cn = Nothing


    (şenol, New Caledonia)

  3. Hi Florida Doc,

    I think you might find something useful from that website regarding ADO query:

    http://www.w3schools.com/ado/default.asp

    (ahmet, Zimbabwe)



Related Topics ... (or search in 1.720.883 topics !)

database access with ado (4)
ado and access... argh!! (8)
connect to access database using ado (6)
bug in my login page, or ado, or access db (3)
parameters to stored procedure using ado and ms access (3)
connecting to a secured access database with ado and asp (4)
limiting results from an access query through asp/ado/jet sql (6)
ado 2.8? (14)
much ado about nothing (7)




copyright © 2007-2031 Pfodere.COM ( 6 Pfoyihuee Online )

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
0.7202