I have a class in my Linq-To-Sql model and am trying to map a stored procedure to it. No matter what I try, I get a message:
one or more selected database objects return a schema that does not match
The scheme definitely matches, I even resorted to a simple "select top 100 rows" auto-generation in SSMS and putting this in SP, nothing more, and I still get this message.
Is there anything else I should look at?
My table layout is as follows:
CREATE TABLE [dbo].[Booking](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ClientID] [int] NULL,
[BookingTypeID] [int] NULL,
[LinkedBookingID] [int] NULL,
[DateCreated] [smalldatetime] NULL,
[DateUpdated] [smalldatetime] NULL,
[BookingDateTime] [smalldatetime] NULL,
[BookingStatusID] [int] NULL,
[ConfirmationRequired] [bit] NOT NULL,
[Confirmed] [bit] NOT NULL,
[InProgress] [bit] NOT NULL,
[ServiceID] [int] NULL,
[EmployeeID] [int] NULL,
[Duration] [int] NULL,
[ProcessingDuration] [int] NULL,
[IsPartOfCourse] [bit] NULL,
[CancellationReason] [int] NULL,
[Timestamp] [timestamp] NULL,
[IsLinked] [bit] NULL,
CONSTRAINT [PK_Booking] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]
and SP:
CREATE PROCEDURE booking_test
AS
BEGIN
SELECT TOP 1000 [ID]
,[ClientID]
,[BookingTypeID]
,[LinkedBookingID]
,[DateCreated]
,[DateUpdated]
,[BookingDateTime]
,[BookingStatusID]
,[ConfirmationRequired]
,[Confirmed]
,[InProgress]
,[ServiceID]
,[EmployeeID]
,[Duration]
,[ProcessingDuration]
,[IsPartOfCourse]
,[CancellationReason]
,[Timestamp]
FROM [Booking]
END
GO