0

Hi,
In my Insert SP, I have 5 local variables:
@MemberID int,
@VideoID int,
@Total money,
@DateRented datetime,
@DateDue datetime

insert into RentalRecord
values (@MemberID,@VideoID,@Total,GETDATE(), DATEADD(dd,5,GETDATE()))


When I try to execute the SP, I get this error:
Procedure or function 'sp_AddRentalRecord' expects parameter '@DateRented', which was not supplied.

Please advise.

Thanks

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by dickersonka
0

not for sure, but i would say because that parameter was never used and i figure he took it out

@DateRented become GetDate()
@DateDue become GetDate() + 5

so i believe he originally had them in the stored procedure as parameters, and then removed them to fix the problem, as they weren's used

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.