Microsoft Access
  Home arrow Microsoft Access arrow Page 4 - Working with Stored Procedures in an MS Ac...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MICROSOFT ACCESS

Working with Stored Procedures in an MS Access Project
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2007-01-17

    Table of Contents:
  • Working with Stored Procedures in an MS Access Project
  • Creating a Stored Procedure
  • A Stored Procedure Without Parameters
  • Does MS Access Project support the directionality of the parameters?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Working with Stored Procedures in an MS Access Project - Does MS Access Project support the directionality of the parameters?


    (Page 4 of 4 )

    The stored procedures may take an input parameter and return the output of the procedure in another parameter. This is called the parameter's direction property. The Stored Procedure interface we saw earlier does not show any possible features which appear to be related to the "direction" of the parameter. The direction of the parameter may be inserted into the SQL statement and saved. But this is not available in the project as a feature of the wizard. You may place this under Tips and tricks. It is a tip but not a trick.

    Now go back to the design view of the stored procedure and add a question mark for the Product name. When you step out, @Param2 will have been added to the stored procedure as shown.

    The SQL of this stored procedure is shown next. Since the MS Access Project does not support returning the result of the procedure in a parameter, you will have to modify the SQL statement for this procedure and save. The saved stored procedure was named BasicInOut. The modified SQL is as shown in the next paragraph.

    DECLARE @RC int
    DECLARE @Param1 int
    DECLARE @Param2 nvarchar(50)
    -- Set parameter values
    EXEC @RC = [parametersSQL].[dbo].[BasicInOut] @Param1, 
    @Param2 OUTPUT

    Since this stored procedure is not supported by the project interface, the result of executing this stored procedure can be seen in the Query Analyzer by using the proper parameter input.

    Now to test run this query we run it for an input parameter, @Param1='7'. When this query is run you will get the following output. As we have seen earlier, for the SupplierID=7 multiple outputs are possible, out of which only one of them is shown. In order to see all the values you will have to modify the SQL. This is outside the scope of this article, as it's more than likely that Microsoft Project does not seem to support returning the result in a parameter.

    Summary

    The tutorial shows the steps involved in creating stored procedures using MS Access 2000 with the back end SQL 2000 Server. It describes three kinds of stored procedures including procedures that return values in parameters. The interface does not support the parameter "out" directionality. The SQL View, however, can be used to create such a procedure, although it cannot be tested within MS Access. Microsoft did not support Access Projects in 2003, however it supports it in Access 2007, which is still in beta.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Using stored procedures you are buying in security so that your code is safe from...
       · Hi,I liked your article on stored procedures. I was wondering if we can use...
       · Hi,I also have the same issue. I right now have application which uses Tables...
     

    MICROSOFT ACCESS ARTICLES

    - Converting a MySQL Database to an Excel Work...
    - Linking SQL Express 2005 Tables to MS Access...
    - Working with Access Projects in Access 2007
    - Exploring Access 2007
    - Working with Stored Procedures in an MS Acce...
    - Creating and Using Action Queries
    - Creating Data Access Pages with Charts using...
    - Advanced Ideas using VBA
    - VBA Details
    - Updating Records in MS Access
    - Using ADO`s Record Object with URLs
    - Exporting XML from MS Access 2003
    - Importing XML into MS Access 2003
    - On Using Pass-through Queries in MS Access
    - Distributed Queries in MS Access





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    Stay green...Green IT