Executing Stored Procedure

B

Bryan

Would appreciate some help in calling a stored procedure
correctly in a Access ADP project.

Here is the stored procedure.

ALTER procedure proc_frmHours_Duplicate
@EmployeeID int,
@start DateTime

as
if exists (SELECT Employee_Number_H, Start
FROM dbo.tblhours
WHERE (CONVERT(char(10), Start, 01) = @Start) AND
(Employee_Number_H = @EmployeeID))
return(1)
else
return(0)


Question I have is how do I call the procedure from
Access to return the return value of either (1) or (0)

Generally I call a stored procedure using the following

Set rst = CurrentProject.Connection.Execute _
("EXEC proc_frmhours_duplicate @employeeID = '" & Me!
cboemployee & "', @start = ' " & Me!Txtstartdate & " '")

Help ??
 

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