Perhaps definition is not the best choice of words. Stored Procedures are
run on a server database though. Even if that server service is running on a
local machine.
As far as precompiled. That's true after the first compilation. But that's
true of Access queries as well. They are compiled after first use, then
decompiled with each compaction of the front-end. Views are also compiled on
first use, but they are only cached for a session.
The query plan often changes with the number of records required, so
recompiling is often more efficient. Unlike Access queries, Stored Procs are
only compilable once, so they are often dropped and rebuilt like this:
IF EXISTS (Select * from sysobjects where id =
object_id('dbo.sp_DeleteKeyDups') and sysstat & 0xf = 4)
drop procedure dbo.sp_DeleteKeyDups
GO
Create Procedure sp_DeleteKeyDups
....
Writing the SQL like this assures that a new compile will take place each
time the procedure is run.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access