Van said:
Just check Access Help or Access books and see if "Query" is vague.
The Access help glossary informs me a query is a 'A formalized
instruction to a database to either return a set of records or perform
a specified action on a set of records'. However, In the wider SQL
world outside of Access, there is a distinction between a SQL DML
'query' (returns rows) and a SQL DML 'statement' (modifies something).
There is also a distinction between rows and records but that's another
matter
I revise my 'vague'. The Access developers have taken liberties with
the generally accepted meaning of SQL query!
In Access can I put a SQL statement (as distinct from a query) into a
Query object (big Q) but that doesn't make it a query (small q).
Whether you have the PARAMETERS declaration or not, it is still a Parameter
Query.
OK, I run a CREATE PROCEDURE statement it creates a Query Parameter
Query object in the database. So we're all talking about the same
underlying thing, right? So why have you jumped on me for using a
different syntax to create the object? You want to be friendly to
newbies, even if they don't speak 'Access' speak, don't you?
I wonder where you think the SP will be executed?
I tried to use an Access term and got it wrong. Sorry
I was trying
to make a logical (not physical) distinction between code used in front
end application and code used at the database engine level. No need to
put the whole SQL code in the front end app when all the database
engine needs to know is the parameter values for a commonly used query
or statement.
Most Access book I read have only JET Tables in the Back-End and the rest in
the Front-End. Perhaps, most authors are wrong and you are right.
Most SQL authors recommend to have database code in one place i.e. in
the database, rather than in one or more front end applications. There
are all sorts of reasons: maintenance (i.e. change code only in one
place), SQL injection attacks, etc. You need to read more widely than
the Access world, I feel.