Results 1 to 6 of 6

Thread: Qry Reference

  1. #1
    Join Date
    Feb 2004
    Posts
    104

    Unanswered: Qry Reference

    In ADOX the Catalog object has a Procedure collection. I want to refer to a qry in my Access db within Procedure collection but I can't if the qry hasn't a parameter.Why?

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

    Smile Re: Qry Reference

    Originally posted by NonLinear
    In ADOX the Catalog object has a Procedure collection. I want to refer to a qry in my Access db within Procedure collection but I can't if the qry hasn't a parameter.Why?
    Try using the tables collection of the Catalog object. Look for the Table.Type of "View".
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  3. #3
    Join Date
    Feb 2004
    Posts
    104
    Ok. You are right. Thanks. But is it right that the Procedure collection has only the qries which have parameters?

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

    Smile

    Originally posted by NonLinear
    Ok. You are right. Thanks. But is it right that the Procedure collection has only the qries which have parameters?
    This is some info from a book I have so I won't take credit.

    Views are stored Jet SQL statements that return a rowset without parameters and without multiple SELECT statements, such as union queries have.

    The ADOX Procedures collection contains all the Access queries that do not belong to the Views collection. These include parameter queries, action queries, and an assortment of other queries, such as union queries and cross-tab queries.

    Hope this helps.
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  5. #5
    Join Date
    Feb 2004
    Posts
    104
    It's clear now.But is it oxymoron (strange) why Views collection is a type of Table collection? (Views in ADOX belongs to Table though Views is a qry)

  6. #6
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445
    Originally posted by NonLinear
    It's clear now.But is it oxymoron (strange) why Views collection is a type of Table collection? (Views in ADOX belongs to Table though Views is a qry)
    With the ADO object model there are a number of ways to accomplish the same task and refer to things. I have found that there are generally specific benifits to each method. It makes it pretty flexible but interesting to get used to.
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

Posting Permissions

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