Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    Cool Unanswered: Help! Cannot modify Query's SQL

    Hi All,

    I try to modify the existing query's SQL statement using ADO code :

    Set Command = Catalog.Procedures("xxx").Command
    (where xxx is the existing query name)

    But find that Access can't locate the "xxx" query. When I try to use Views instead of Procedures, it work (i.e. can find the existing query), but later it still don't work next time.

    Can anyone give me a help? Use Views or Procedures to modify exisitng SQL statement? Big Thanks.

  2. #2
    Join Date
    Nov 2004
    From this article

    "Additionally, the ADOX Views and Procedures collections are used to distinguish between the kinds of queries. A View object is used to work with queries that return records and have no parameters; a Procedure object is used to work with any query that doesn't return records, such as an update or delete query, or a query with parameters that returns records."

    I suspect you may be changing the query so it "moves" to be a non parameterized, row returning query a.k.a view.

Posting Permissions

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