HI,
You can create a VIEW and a sproc with Jet 4.0, but they must be (for
the stored proc) made of a single statement, like for a parameter query,
really no advantage, unless that a stored proc can be use as if it was a
function, instead of having to pass by a command object... which can be
useful in some cases. You have to do it using ADO (not DAO, not the query
designer):
CurrentProject.Connection.Execute "CREATE VIEW viewName AS SELECT
.... "
CurrentProject.Connection.Execute "CREATE PROCEDURE alpha(beta) AS
SELECT ... WHERE fieldName = beta "
... = CurrentProject.Connection.Execute( "EXEC alpha 444" )
which is, in many aspect, much easier than using an ADO command object: you
can build the string at run time and beneficiate of a pre-compiled query at
the same time.
The stored proc can be an action query, not necessary a data retreival
query, as shown (like an INSERT INTO query, often use in introduction book
as use of stored procedure... but I won't comment that kind of use of a
stored proc).
A feature in Access 2000 hide the VIEW you would have created this way from
the database main window. You see then in Access 2002 and later.
Hoping it may help,
Vanderghast, Access MVP