Getting Output from Stored Procedure

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top