Results 1 to 2 of 2
  1. #1
    TSSIn is offline Novice
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    3

    converting apd to accdb and passing parameters to stored procedures

    Hello,



    I have an Access adp I am trying to convert to accdb. The adp is linked to a SQL server db backend. I was able to migrate the forms and reports from the adp. I relinked all the tables and views to the new accdb.

    However, I am trying to figure out how to used the SQL server stored procedures. There are a number of forms that use a stored procedure as the data source. Some of the stored procedures have parameters. I started creating pass through queries to replace the stored procedures. But for a stored procedure that uses parameters how do I do that and pass or set the parameters for the stored procedure.
    For example one form has the data source as: Exec spGetDonor
    The spGetDonor stored procedure code is:
    SET ANSI_NULLS ON
    GO


    SET QUOTED_IDENTIFIER ON
    GO


    ALTER PROCEDURE [dbo].[spGetDonor]

    (@intDonorID int = NULL)


    AS


    SET NOCOUNT ON


    SELECT DonorNo
    ,Title
    ,FirstName
    ,LastName
    ,Address1
    ,Address2
    ,City
    ,State
    ,Zip
    FROM tblDonor
    WHERE @intDonorID IS NULL
    OR DonorNo = @intDonorID

    If I create a pass through query with this SQL how do I set the DonorID to pass to it? Or is there another way to do this?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Using Stored Procedures with QODBC (sp_reports)
    By mcucino in forum Import/Export Data
    Replies: 0
    Last Post: 09-13-2018, 04:28 PM
  2. Use stored procedures from database
    By jaryszek in forum SQL Server
    Replies: 3
    Last Post: 06-29-2018, 02:40 AM
  3. Queries, Views, Stored Procedures, Oh my!
    By ssanfu in forum SQL Server
    Replies: 7
    Last Post: 10-08-2017, 12:02 PM
  4. Set date parameters within Stored Procedures
    By Brian62 in forum SQL Server
    Replies: 0
    Last Post: 02-15-2012, 04:40 PM
  5. stored procedures failure
    By MrGrinch12 in forum Programming
    Replies: 1
    Last Post: 06-23-2010, 12:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums