Solved

Comparison of approach SQL=>Access

Posted on 2014-10-23
7
364 Views
Last Modified: 2014-10-23
Hi All,

SQL server 2008 with stored procedures returning data, some with parameters and some without.

MS Access 2007 front end.

What are the efficiency differences, and other considerations, between:

(1) Passthrough query with "EXEC sp"
(2) DAO connection with executed SQL "EXEC sp" & parameters, returning a recordset
(3) ADO connection, making use of the object model and adding parameters, returning a recordset

Thanks
0
Comment
Question by:James Elliott
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 200 total points
ID: 40399079
I use all three and the only consideration for me is the level of control that I want vs ease of use.

ADO gives you the most of how something executes, but it's on its way out as Microsoft is trending back to ODBC.

Performance wise, I've never bothered to check.  Would expect the first two to be almost identical.

Jim.
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 200 total points
ID: 40399084
I double you'll find much difference between the methods, with the possible exception of execution speed (and you could only determine that by doing your own timing tests). In some cases you might find method (1) to be fastest, for example, whereas in others you might find method (2) or (3).

Methods (1) and (2) means no outside dependencies, unlike Method (3), so there's always that. Not to say that ADO is difficult to deal with, but if you mark a reference for 2.8 and the user has 2.7, you'll get an error.

In general, working with ADO can be slightly less performant that working with DAO in Access, since DAO is tightly coupled. That said, I've never really seen any noticeable performance hits with ADO, even with larger datasets.

For my money, if I need to return a records from a SQL Server database, I use (3) and make sure I use an ADO reference that my target machines will have (like 2.5) and let Access "upsize" that reference as needed. No real reason for choosing that, other than the fact that it's what I've always used, and I'm comfortable with it. I've tried (1), and had good luck with it, but never really like the fact that I had to change the connection string of those pass-through queries when deploying. With ADO, I could store the new server/database info and recreate the connection string as needed for my connection object.
0
 
LVL 12

Author Comment

by:James Elliott
ID: 40399157
Thanks both.

Scott ==> Can you expand a bit on your deployment point. Why would the pass through queries need a new connection string? Could I not add an ODBC connection to my user's network profiles?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 85
ID: 40399184
Pass Through queries have a Connection property, which sometimes must be reset if you deploy to your end users. If you use a DSN then you could use the DSN in the connection property - however, you'd have to create that DSN on the user machine, or you'd have to insure it exists (and points to the right database).
0
 
LVL 48

Assisted Solution

by:Dale Fye (Access MVP)
Dale Fye (Access MVP) earned 100 total points
ID: 40399237
Ref the pass-thru connection string.  If you are using DAO, you may already be updating the connection string of your SQL linked tables (connecting to a production database versus a development one).  Updating the connection string of those pass-thru queries is no more difficult than doing so for the linked tables.
0
 
LVL 85
ID: 40399281
I agree that it's no more difficult, it's just one more step that needs to be handled.
0
 
LVL 12

Author Closing Comment

by:James Elliott
ID: 40399369
Thanks all. Great insight.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question