Microsoft SQL Server

  • 2 minutes to read
NOTE

You are viewing documentation for the legacy WPF Scheduler control. If you're starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

TIP

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E2895.

The following *.sql script can be used to generate two tables to persist appointment and resource data.

CREATE TABLE [dbo].[Appointments] (

        [UniqueID] [int] IDENTITY (1, 1) NOT NULL ,

        [Type] [int] NULL ,

        [StartDate] [smalldatetime] NULL ,

        [EndDate] [smalldatetime] NULL ,

        [AllDay] [bit] NULL ,

        [Subject] [nvarchar](50) NULL ,

        [Location] [nvarchar](50) NULL ,

        [Description] [nvarchar](max) NULL ,

        [Status] [int] NULL ,

        [Label] [int] NULL ,

        [ResourceID] [int] NULL ,

        [ResourceIDs] [nvarchar](max) NULL ,

        [ReminderInfo] [nvarchar](max) NULL ,

        [RecurrenceInfo] [nvarchar](max) NULL ,

        [CustomField1] [nvarchar](max) NULL

CONSTRAINT [PK_Appointments] PRIMARY KEY CLUSTERED

(

        [UniqueID] ASC

)

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE TABLE [dbo].[Resources] (

        [UniqueID] [int] IDENTITY (1, 1) NOT NULL ,

        [ResourceID] [int] NOT NULL ,

        [ResourceName] [nvarchar](50) NULL ,

        [Color] [int] NULL ,

        [Image] [image] NULL ,

        [CustomField1] [nvarchar](max) NULL

CONSTRAINT [PK_Resources] PRIMARY KEY CLUSTERED

(

        [UniqueID] ASC

)

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO 
NOTE

If resource sharing is enabled, the Appointments.ResourceID field's data type should be changed to [nvarchar](max).