Re: Stored procedure functionality and visibility questions
- From: John Nurick <j.mapSoN.nurick@xxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 20:52:43 +0100
Hi Troy,
Like the other Office apps Access can be used as an Automation server,
so any OLE-aware application (or script) can fire up an instance of
Access, open a database and run queries, reports, etc. to its heart's
content (more or less).
The process is a little more complicated with Access than (say) Word or
Excel, and it's worth studying http://support.microsoft.com/?id=210111.
I have the impression that most of the time it's best to use DAO or ADO
to get at the data, and that the commonest real need for automating
Access is to use its reporting engine.
Whether it's worth doing in this case probably depends on how much of
the processing you need to do is internal to the Access database. If
there's a lot of data mangling which produces a small recordset for your
external application, doing it in Access might be best. Otherwise I'd be
inclined to use VBA+recordset via DAO (or ADO if you prefer).
On Tue, 30 Aug 2005 06:19:04 -0700, "Tspwi"
<Tspwi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>Thank you for the quick response and the confirmation of what I was suspecting.
>
>Could you explain a little what you mean by
>"have your external application automate Access."
>
>I may end up going the ADO recordset route but I would like to make sure
>I've considered any other options first.
>
>Thanks,
>Troy
>
>
>"John Nurick" wrote:
>
>> On Mon, 29 Aug 2005 09:25:01 -0700, "Tspwi"
>> <Tspwi@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>> >I've recently been working on a project that uses a stored procedure to
>> >perform some complex query processing along with some manipulation of the
>> >results using T-SQL and PL/SQL. I would like to be able to support the same
>> >thing with an Access database but I haven't been able to find the answers to
>> >these two questions and I'm hoping someone more familiar with Access
>> >development can help.
>> >
>> >1. Can a "stored procedure" in Access be anything more than a single SQL
>> >statement? Is anything like T-SQL supported?
>> >The only samples I can find are using single SQL queries like
>> >Create Procedure myProc (prmCity varchar) AS SELECT * FROM Customers WHERE
>> >City = prmCity
>> >but I also keep reading about additional stored procedure support that was
>> >added in Access 2000. Is this what that is referring to?
>>
>> As far as I know that's the case. The Jet SQL documentation is clear
>> that CREATE PROCEDURE creates a stored procedure containing a single SQL
>> statement.
>>
>> >2. I've looked into using a VBA function or procedure to perform the task
>> >but I haven't been able to find any information to confirm that calling the
>> >function or procedure would be possible from an application that isn't an
>> >Office application. I need to have a function that can be called by another
>> >application through ADO. Is that possible?
>>
>> No. Custom VBA functions in queries are handled by Access's "expression
>> service" and not available when you're working with ADO or DAO.
>>
>> One possibility - if you have to use Jet and not a database engine that
>> offers "proper" stored procedures - might be to have your external
>> application automate Access. Alternatively, use ADO recordset operations
>> to access and manipulate the data from the external app.
>>
>> --
>> John Nurick [Microsoft Access MVP]
>>
>> Please respond in the newgroup and not by email.
>>
>>
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.
.
- References:
- Stored procedure functionality and visibility questions
- From: Tspwi
- Re: Stored procedure functionality and visibility questions
- From: John Nurick
- Re: Stored procedure functionality and visibility questions
- From: Tspwi
- Stored procedure functionality and visibility questions
- Prev by Date: See if outlook is running during access program execution
- Next by Date: Re: List Box - Color Change
- Previous by thread: Re: Stored procedure functionality and visibility questions
- Next by thread: Need help!!! with connection from internet (intranet okay)!!!
- Index(es):
Relevant Pages
|