Access ACCESS ADP Stored Procedure Problem

jfk

Joined
Jul 11, 2007
Messages
1
Reaction score
0
Hi,

I'm fairly new to ADP but quite experienced in Access and I'm currently in the process of upsizing a failrly complex system.

I've managed to get a handle on SPs and Functions but I'm hitting a snag with this particular one; the sp is simply to perform a SUM on a time field stored as seconds (bigint)

CREATE PROCEDURE worked_in_week
@namein as varchar(30), @stdate as datetime, @enddate as datetime,
@worked as bigint OUTPUT
AS
SELECT @worked = SUM([Total Seconds])
FROM [duration per day]
WHERE ([Staff Name] =@namein) and
([Date]) >= CONVERT(datetime, @stdate,103) and
([Date]) <= CONVERT(datetime, @enddate,103)

The procedure is returning a null value and it's screwing up my code at the VB end. Can anyone spot anything glaringly obvious!!
 
Back
Top