Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2006, 08:56 PM
Authorized User
 
Join Date: Feb 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Where is the processing done in ADP

Hi,

I'm current working on an Access ADP and fine tuning some of the forms and hence stumbled across a question on processing of queries in Access ADP.

In an Access ADP, where is a query processed?

Generally, for views and stored procedures, an SQL query is processed by the SQL Server. Similarly, for an ADO Command, the SQL Server will take over the processing.

How about the following case:
I have created a view called "myView" on the SQL Server.
In my form, the rowsource is set to :

SELECT * from myView WHERE x<10

In my situation, where is the processing done?
Am I right to say that the entire myView will travel to the Access ADP and Access will process the View with the WHERE Clause?

Please advise.

Thanks.

Scripts82
__________________
Scripts82
 
Old March 22nd, 2006, 10:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

 
Quote:
quote:Am I right to say that the entire myView will travel to the Access ADP and Access will process the View with the WHERE Clause?


Nope. In a regular .mdb, the Jet Engine provides both local storage and a local query processor. With ADPs, there is no Jet engine, so there is neither local storage, nor local query processing, none, nada.

The View is processed entirely by SQL Server, and just the result set (a sort of "virtual table", a view of a subset of a table) is returned over your OLE DB connection to the ADO Cursor Engine, which creates and manages a client-side recordset that your form uses.

HTH,

Bob


 
Old March 22nd, 2006, 10:48 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

Just to demonstrate the above, I created a form in an ADP and set it Row Source property to:

Select * FROM vwCategories WHERE CategoryID < 5

using the vwCategories object in the NorthwindCS SQL Server database. Then I started a trace using SQL Server Profiler an here are the partial results of just opening the form:

SQL:BatchStarting Select * FROM vwCategories WHERE CategoryID < 5
SQL:BatchCompleted Select * FROM vwCategories WHERE CategoryID < 5


The whole T-SQL statement the Row Source property is set to is processed on SQL Server, 4 records are fetched and returned to the client, where they reside in an ADO client-side recordset managed by the ADO Cursor Engine.

HTH,

Bob


 
Old March 23rd, 2006, 12:00 AM
Authorized User
 
Join Date: Feb 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great! Thanks Bob!

Scripts82





Similar Threads
Thread Thread Starter Forum Replies Last Post
adp slowness ginoitalo Access 1 November 6th, 2006 08:21 AM
Readonly ADP Data dhay1999 Access 2 May 4th, 2006 10:12 AM
ADP OpenReport() ginoitalo Access 8 November 29th, 2004 09:10 PM
MDB vs ADP, once again. leprechaun Access 1 August 5th, 2004 02:01 PM
ADP Menubar ginoitalo Access 2 April 11th, 2004 11:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.