日期:2014-02-20 浏览次数:20548 次
在运行之初,先进行web.config文件的配置
<add key="connString" value="Persist Security Info=False;server=(local);database=数据库名;uid=用户名;pwd=密码" />
<add key="LocalPath" value="虚拟目录的物理路径" />
数据库脚本如下:
/****** Object: Table [dbo].[AdminUser] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AdminUser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)drop table [dbo].[AdminUser]GO
/****** Object: Table [dbo].[Article] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Article]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Article]
GO
/****** Object: Table [dbo].[ArticleGroup] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ArticleGroup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ArticleGroup]
GO
/****** Object: Table [dbo].[GroupPurview] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GroupPurview]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GroupPurview]
GO
/****** Object: Table [dbo].[ImageArticle] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ImageArticle]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ImageArticle]
GO
/****** Object: Table [dbo].[Logs] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Logs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Logs]
GO
/****** Object: Table [dbo].[PurviewType] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PurviewType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[PurviewType]
GO
/****** Object: Table [dbo].[SinglePurview] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SinglePurview]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[SinglePurview]
GO
/****** Object: Table [dbo].[UploadFile] Script Date: 2005-6-12 16:26:46 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UploadFile]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[UploadFile]
GO
/****** Object: Table [dbo].[AdminUser] Script Date: 2005-6-12 16:26:48 ******/
CREATE TABLE [dbo].[AdminUser] (
[uid] [int] IDENTITY (1, 1) NOT NULL ,
[uname] [varchar] (24) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[upsw] [varchar] (36) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[gid] [int] NULL ,
[realname] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[regtime] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[email] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Article] Script Date: 2005-6-12 16:26:48 ******/
CREATE TABLE [dbo].[Article] (
[aid] [int] IDENTITY (1, 1) NOT NULL ,
[agid] [int] NULL ,
[isHidden] [bit] NULL ,
[isMain] [bit] NULL ,
[atitle] [varchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[acontent] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
[ntime] [datetime] NOT NULL ,
[nclick] [int] NULL ,
[isBold] [bit] NULL ,
[uid] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/******