Hi
I'm trying to make a query i have in Access run when I open the file through VB. The query will run if I open the Access file using Access but when my VB code opens the file it won't run. Anyone know how I can force the query to run? Thanks
Note that the query parameter list is enclosed in parenthesis, and the entire statement is enclosed in curley braces. Then open the recordset just as you would with any other SQL statement.
RecSet.Open SQLStmt, ADO_Connect
Good Luck
-------------- As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
It is worth a purple, even for the concept. I assume that in the broader process the AD_Connect refers to refers to an ADO.Connection object which 'point to" the Ms. A. ".MDB" application?
JET 4 supports ANSI 92 Extensions so you can use the EXECUTE clause for stored proceedures in the below syntax:
(SomeProceedure is a query with one parameter as criteria)
Conn.Execute "EXECUTE SomeProceedure 'abc'"
or
Set rsADO = conn.Execute ("EXECUTE SomeProceedure 'abc'"
or
rsADO.Open ("EXECUTE SomeProceedure 'abc'"
JET 4 also supports:
CREATE PROCEDURE
CREATE VIEW
DROP PROCEDURE
DROP VIEW
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.