vcujackson
Technical User
I prepared the following as a stored procedure using a date parameter. I then pass it over to a crystal report. When I try and open the report in crystal 2008 it prompts me the the @GifteffdatBegin and @GifteffdatEnd date as it should. It prompts me to insert the date as follows mm/dd/yyyy 00:00:00:00 or datetime format. When I do this I get an invalid argument message. This leads me to conclude that I have done something wrong in coding on the sql procedure side. Please look at the code and tell me if there are errors that would cause this issue. AM I going to need to declare the parameter in addition to listing it in the beginning of the procedure???
ALTER PROCEDURE [dbo].[NGP_Parameter]
-- Add the parameters for the stored procedure here
@GifteffdatBegin datetime,--beginning date
@GifteffdatEnd datetime --ending date
AS
SELECT giftkey,giftid,gifteffdat
FROM gift_table
WHERE gifttype = 'a'
AND gifteffdat >= @GifteffdatBegin
AND gifteffdat <=@GifteffdatEnd
ALTER PROCEDURE [dbo].[NGP_Parameter]
-- Add the parameters for the stored procedure here
@GifteffdatBegin datetime,--beginning date
@GifteffdatEnd datetime --ending date
AS
SELECT giftkey,giftid,gifteffdat
FROM gift_table
WHERE gifttype = 'a'
AND gifteffdat >= @GifteffdatBegin
AND gifteffdat <=@GifteffdatEnd