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
"Brian K. Sheperd" <(E-Mail Removed)> wrote in message
news:uPXNv2%(E-Mail Removed)...
> Yes. I was looking for something similar to SQL Server. How do you
specify
> which engine to use? Does it set it for the application, or is only
> database specific? Is this the database upsizing or something different?
>
> Thanks,
> Brian
>
>
>
> "Tom Ellison" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Dear Brian:
> >
> > Microsoft Access 2000 gives you a choice of 2 database engines, Jet or
> > MSDE. MSDE has specific separate "Views" which, if by View you mean
> > just what that means in SQL Server, this is just what you want.
> >
> > If you choose to use the Jet database engine, then the Queries there
> > will do pretty much the same thing. But you don't have Stored
> > Procedures or User Defined Functions if that's what you're accustomed
> > to. You can still perform such things, however, using dynamically
> > generated SQL or other techniques.
> >
> > Jet does give you the advantages of being able to use Public Functions
> > you write in VBA and to reference controls on forms directly.
> >
> > If you already know SQL Server, then the MSDE route is transparent.
> > MSDE is a full implementation of SQL Server, but with some size and
> > performance limitations.
> >
> > Tom Ellison
> > Microsoft Access MVP
> > Ellison Enterprises - Your One Stop IT Experts
> >
> > On Thu, 11 Dec 2003 15:03:11 -0500, "Brian K. Sheperd"
> > <(E-Mail Removed)> wrote:
> >
> > >Is it possible to create views in Access 2000? I have seen several
> places
> > >that mention it, but I keep getting an error. Then I checked the
Access
> > >help file, and it mentions it, but it also says that Jet doesn't
support
> it.
> > >If this can be done in Access, how do you go about doing this?
> > >
> > >Thanks,
> > >Brian
> > >
> >
>
>
|