Getting Output from Stored Procedure

  • Thread starter Thread starter nethertoni
  • Start date Start date
N

nethertoni

I am new at coding adp and sql server. I am having trouble getting a
single output from a stored procedure.
Prodedure:
CREATE PROCEDURE dbo.spGetData (@ContactID int,
@EmpName nvarchar(100) OUTPUT)
AS
SELECT @EmpName = C.ContactName
FROM dbo.Contacts C
WHERE C.ContactID = @ContactID
GO

Code to call from adp:
Dim intTest as Integer
Dim strTest as String

intTest = 100
strTest = CurrentProject.connection.Execute ("spGetDate " & intTest)

What am I doing wrong?
 
Back
Top