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?