B
Ben Fidge
Hi
I'm getting an error which says "The SqlDbType enumeration value, 4, is
invalid." when calling one of my stored procedures. The SP doesn't actually
take any parameters and my C# code doesn't attempt to pass it any.
SqlDbType value 4 is actually SqlDbType.DateTime.
My SP simply retrieves a list of the most common Shows sold over a period of
the last 31 days
My procedure is as follows:
CREATE PROCEDURE [dbo].[prcTheatres_GetTop5ShowsAsListItem]
as
select UKey, Description as Text from dbo.vwTheatres_Shows where UKey in
(select top 5 UKeyShow from dbo.Theatres_Bookings
inner join dbo.vwTheatres_Shows on dbo.vwTheatres_Shows.UKey =
dbo.Theatres_Bookings.UKeyShow
where Date_Time_Entered > GetDate() - 31 group by UKeyShow order by Count(*)
desc)
I'm getting an error which says "The SqlDbType enumeration value, 4, is
invalid." when calling one of my stored procedures. The SP doesn't actually
take any parameters and my C# code doesn't attempt to pass it any.
SqlDbType value 4 is actually SqlDbType.DateTime.
My SP simply retrieves a list of the most common Shows sold over a period of
the last 31 days
My procedure is as follows:
CREATE PROCEDURE [dbo].[prcTheatres_GetTop5ShowsAsListItem]
as
select UKey, Description as Text from dbo.vwTheatres_Shows where UKey in
(select top 5 UKeyShow from dbo.Theatres_Bookings
inner join dbo.vwTheatres_Shows on dbo.vwTheatres_Shows.UKey =
dbo.Theatres_Bookings.UKeyShow
where Date_Time_Entered > GetDate() - 31 group by UKeyShow order by Count(*)
desc)