MS Access for the Business Environment: Stored Procedures from the MS Access Client

About the Series …

This article continues the series, MS Access for the
Business Environment
. The primary focus of this series is an
examination of business uses for the MS Access relational database management
system. The series is designed to provide guidance in the practical application
of data and database concepts to meet specific needs in the business world. The
majority of the procedures I demonstrate in the series will be undertaken
within MS Access 2003, although most of the concepts that we explore in
the series will apply to earlier versions of MS Access, as well.

For
more information on the series, as well as the hardware / software requirements
to prepare for the tutorials we will undertake, please see Tutorial
1: Create a Calculated Field with the Expression Builder
. Along with MS Access, of which
we have made repeated use in the previous articles of the series, additional
application considerations apply for this tutorial, because it introduces
another Microsoft RDBMS, MSSQL Server 2000.

For
those joining the series at this point because of a desire to work with MSSQL
Server 2000
and its components from an MSSQL Server perspective, it is
assumed that MSSQL Server 2000 is accessible to / installed on your PC, with
the appropriate access rights to the MSSQL Server 2000 environment to parallel
the steps of the article. If this is the first time MSSQL Server 2000 is being
accessed on your machine, you may need to consult the MSSQL Server 2000 online
documentation for installation and configuration instructions.

Introduction to this Tutorial

This article focuses on a topic that
in many ways is akin to our last, Extend
Access with Pass-Through Queries
, in that it is based upon
the use of "SQL specific" or "direct SQL"
within MS Access. While we have also treated the use of SQL specific queries
in other articles, our work with Pass-Through queries in the previous
article provides an excellent segue to the use of Stored Procedures
within MS Access. The preparation steps of this article will parallel some of the
same steps in the last, particularly in the establishment of a data connection.
In keeping with my goal of making my articles "standalone," where a reader
can perform the steps of the procedures described 1) without having necessarily
followed all or part of the series first, and 2) without having to refer to
steps in external sources to gain the benefit of an integrated lesson, we will
repeat all necessary steps to achieve our objectives from "scratch."
My intent is to activate the concepts we introduce within each article through
practice examples that are based upon needs that we encounter in the business
world, in an end-to-end, complete fashion that allows for "one-stop"
exposure to practical subject matter. We will attempt to avoid the broken focus
and distraction that come with having to skip about between documents.

Many of us have encountered MS
Access in one or more roles in client / server architecture; most of us have
been exposed to the use of MS Access as a "front end" to various
enterprise-level, back-end databases. As we have mentioned before, MSSQL
Server
is a natural for the back-end partner in such arrangements, and we
can manage communication between MS Access and MSSQL Server in multiple ways. The
flexibility of SQL Pass-Through queries, which we discussed at length in
Extend Access with Pass-Through Queries
,
allows us enhanced, efficient communication between MS
Access and SQL Server, in that we can use this medium to capitalize upon the
use of MSSQL Server-specific SQL to query SQL Server databases with minimal
overhead cost at the MS Access level. We will take the pass-through concept
one step further in this article and focus on using Access to call Stored Procedures
that exist on MSSQL Server, and thereby optimize our interaction with the
back-end environment even more.

In this article, we will examine
the execution of Stored Procedures from an MS Access client to realize
these efficiencies. Our examination of Stored Procedures from an MS
Access perspective will include the following:

  • A discussion of the nature of Stored Procedures, and
    instances in which their use can be beneficial;

  • A discussion of the advantages that accrue when we leverage Stored
    Procedures
    from MS Access;

  • Hands-on, practice exercises that include the use of Stored Procedures
    within MS Access query objects that we create, together with a more involved scenario,
    in which we create, and then execute, a more substantial Stored Procedure,
    intended to address a hypothetical business need.
William Pearson
William Pearson
Bill has been working with computers since before becoming a "big eight" CPA, after which he carried his growing information systems knowledge into management accounting, internal auditing, and various capacities of controllership. Bill entered the world of databases and financial systems when he became a consultant for CODA-Financials, a U.K. - based software company that hired only CPA's as application consultants to implement and maintain its integrated financial database - one of the most conceptually powerful, even in his current assessment, to have emerged. At CODA Bill deployed financial databases and business intelligence systems for many global clients. Working with SQL Server, Oracle, Sybase and Informix, and focusing on MSSQL Server, Bill created Island Technologies Inc. in 1997, and has developed a large and diverse customer base over the years since. Bill's background as a CPA, Internal Auditor and Management Accountant enable him to provide value to clients as a liaison between Accounting / Finance and Information Services. Moreover, as a Certified Information Technology Professional (CITP) - a Certified Public Accountant recognized for his or her unique ability to provide business insight by leveraging knowledge of information relationships and supporting technologies - Bill offers his clients the CPA's perspective and ability to understand the complicated business implications and risks associated with technology. From this perspective, he helps them to effectively manage information while ensuring the data's reliability, security, accessibility and relevance. Bill has implemented enterprise business intelligence systems over the years for many Fortune 500 companies, focusing his practice (since the advent of MSSQL Server 2000) upon the integrated Microsoft business intelligence solution. He leverages his years of experience with other enterprise OLAP and reporting applications (Cognos, Business Objects, Crystal, and others) in regular conversions of these once-dominant applications to the Microsoft BI stack. Bill believes it is easier to teach technical skills to people with non-technical training than vice-versa, and he constantly seeks ways to graft new technology into the Accounting and Finance arenas. Bill was awarded Microsoft SQL Server MVP in 2009. Hobbies include advanced literature studies and occasional lectures, with recent concentration upon the works of William Faulkner, Henry James, Marcel Proust, James Joyce, Honoré de Balzac, and Charles Dickens. Other long-time interests have included the exploration of generative music sourced from database architecture.

Latest Articles