Jonas Stawski

Everything .NET and More

Sample Repository Posted

For those of you interested in downloading the code for last night's Code Idol session: "Using SQL Server 2005 as a Document Repository" you can do so here. For more details on the code you can also read my previous post on the topic here.

The demo requires a table and bellow is the SQL to generate the table:USE [DocRepository]
GO
/****** Object: Table [dbo].[Doc] Script Date: 10/03/2007 09:12:38 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Doc](
  [DocID] [int] IDENTITY(1,1) NOT NULL,
  [DocName] [nvarchar](100) NOT NULL,
  [Extension] [nvarchar](50) NOT NULL,
  [DocContent] [varbinary](max) NOT NULL,
CONSTRAINT [PK_Doc] PRIMARY KEY CLUSTERED
(
  [DocID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

 

The demo also requires the table to have a Full-Text Index. You can do so very easily by right clicking on the Table - Full Text Index - Define Full Text Index. A wizard will come up. Make sure you index the DocContent column using the Extension column as the Type Column.

Happy Programming!

Add comment

biuquote
Loading