Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    29

    Unhappy Unanswered: ADO listing of querydefs issue

    Well, here we go again. I am converting a multiple delete utility from DAO to ADO and I am having trouble finding any querydef collection or anything in the schema that would list all the queries. This was not too difficult with DAO, but I am just not sure how to get it to happen using ADO.

    I can get the tables, forms, etc. just not the queries.

    I appreciate any help you guys can offer.

    Thanks

    Abboabbo

  2. #2
    Join Date
    Sep 2003
    Posts
    29

    Re: ADO listing of querydefs issue

    Aha. I had to look up the types of schema recordsets.


    Set rst = cnn.OpenSchema(adSchemaViews)

    I guess making the recordset "adSchemaQueries" was a little too much to ask of the developers.

  3. #3
    Join Date
    Sep 2003
    Posts
    29

    Re: ADO listing of querydefs issue

    Well, as good as this sounded, it only listed select queries. I need all query objects within the database.

    ANY GUESSES????

    Thanks

    Originally posted by abboabbo
    Aha. I had to look up the types of schema recordsets.


    Set rst = cnn.OpenSchema(adSchemaViews)

    I guess making the recordset "adSchemaQueries" was a little too much to ask of the developers.

  4. #4
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: ADO listing of querydefs issue

    Originally posted by abboabbo
    Well, as good as this sounded, it only listed select queries. I need all query objects within the database.

    ANY GUESSES????

    Thanks
    Try the ADOX Catalog object for enumerating the Views and Procedures in a database.

  5. #5
    Join Date
    Sep 2003
    Posts
    29

    Re: ADO listing of querydefs issue

    Well, the good news is I finally figured it out. Quite a switch from the old DAO methods, but I guess for the better.

    For Each aob In CurrentData.AllQueries *(AllTables for tables)

    Next aob

    and... for forms, reports, modules, macros...etc...

    For Each aob In CurrentProject.AllForms

    Next aob


    I just wonder why they have to change between CurrentProject and CurrentData for these. I guess it does make a little sense when I think about it...

    Thanks for your help

    Originally posted by basicmek
    Try the ADOX Catalog object for enumerating the Views and Procedures in a database.

Posting Permissions

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