C# 开发DotNetNuke初试(二)_C/C++语言_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

C# 开发DotNetNuke初试(二)

作者:黑客防线网安C/C++教程基地 来源:黑客防线网安C/C++教程基地 浏览次数:0

本篇关键词:开发 OFF ON 
黑客防线网安网讯:    if exists (select * from dbo.sysobjects where id = object_id(N’{databaseOwner}{objectQualifier}F_ARTICLE_UPDATE’) and OBJECTPROPERTY(id, N’IsProcedure’) = 1) drop proce...

    if exists (select * from dbo.sysobjects where id = object_id(N’{databaseOwner}{objectQualifier}F_ARTICLE_UPDATE’) and OBJECTPROPERTY(id,
N’IsProcedure’) = 1)
drop procedure {databaseOwner}{objectQualifier}F_ARTICLE_UPDATE
GO

CREATE PROCEDURE {databaseOwner}{objectQualifier}F_ARTICLE_CREATE
@Title nvarchar(100),
@Content nvarchar(4000),
@CreateTime datetime,
@Author nvarchar(50)
  AS
INSERT INTO {objectQualifier}article(title,content,createtime,author)VALUES(@Title,@content,@CreateTime,@author)
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO
CREATE PROCEDURE  {databaseOwner}{objectQualifier}F_ARTICLE_DELETE
@ID INT
 AS
DELETE FROM {databaseOwner}[{objectQualifier}article] WHERE [ID]=@ID
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO
CREATE PROCEDURE {databaseOwner}{objectQualifier}F_ARTICLE_GETALL
AS
SELECT * FROM {databaseOwner}[{objectQualifier}article]
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO
CREATE PROCEDURE {databaseOwner}{objectQualifier}F_ARTICLE_GETDETAILS
@ID int
 AS
SELECT * FROM {databaseOwner}[{objectQualifier}article] WHERE [ID]=@ID
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO
CREATE PROCEDURE {databaseOwner}{objectQualifier}F_ARTICLE_UPDATE
@ID int,
@Title nvarchar(100),
@Content nvarchar(4000),
@CreateTime datetime,
@Author nvarchar(50)
 AS
UPDATE {databaseOwner}[{objectQualifier}article] SET Title=@Title,Content=@Content,CreateTime=@CreateTime,author=@Author
  WHERE [ID]=@ID
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO
  注意:如果是生成的脚本要在存储过程名称和表名称前如上所示加上{databaseOwner}{objectQualifier}.
              生成的脚本如果出现先建立存储过程后建表的现实要把顺序更正,否则会出现错误
  
  脚本生成之后,要用正确的命名方式命名:01.00.00.SqlDataProvider(等下面谈到建立项目时模板会自动添加正确格式的数据脚本文件,把这些脚本复制粘贴过去即可)
  至此,数据库脚本建立完毕。

    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-15157-1.html
网站维护教程更新时间:2012-04-04 22:50:50  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer