programmatically getting the results from executing a QueryDef?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to execute a stored QueryDef within an Access database from an external VB-like application through Automation. I can verify that I can access the named QueryDef, but I'm also confused by the Execute method within QueryDef objects which doesn't appear to return anything. Likewise, when I find no string associated with the SQL property, yet I can execute the Design View query (named QueryDef) and display results. How can I access the values displayed? Thanks

Ji
 
Assign the results of the execution to a Recordset using the QueryDef's
OpenRecordset method, rather than using the Execute method. Execute is only
meant for Action queries (INSERT INTO, UPDATE, DELETE)

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Jim said:
I am attempting to execute a stored QueryDef within an Access database
from an external VB-like application through Automation. I can verify that
I can access the named QueryDef, but I'm also confused by the Execute
method within QueryDef objects which doesn't appear to return anything.
Likewise, when I find no string associated with the SQL property, yet I can
execute the Design View query (named QueryDef) and display results. How can
I access the values displayed? Thanks.
 
Back
Top