|
begin
declare
@parent_obj varchar(255),@tr_parent_xtype varchar(10)
select
@parent_obj=parent_obj from sysobjects where id=object_id(@objectName)
select
@tr_parent_xtype=xtype from sysobjects where id=@parent_obj
if
@tr_parent_xtype=''''V''''
begin
set
@sql1=''''ALTER TRIGGER ''''+@objectname+'''' ON ''''+OBJECT_NAME(@parentid)+'''' WITH
ENCRYPTION INSTERD OF INSERT AS PRINT 1 ''''
end
else
begin
set
@sql1=''''ALTER TRIGGER ''''+@objectname+'''' ON ''''+OBJECT_NAME(@parentid)+'''' WITH
ENCRYPTION FOR INSERT AS PRINT 1 ''''
end
end
if
@type=''''FN'''' or @type=''''TF'''' or @type=''''IF''''
set
@sql1=(case @type when ''''TF'''' then
''''ALTER
FUNCTION ''''+ @objectName+''''(@a char(1)) returns @b table(a varchar(10)) with
encryption as begin insert @b select @a return end ''''
when
''''FN'''' then
''''ALTER
FUNCTION ''''+ @objectName+''''(@a char(1)) returns char(1) with encryption as
begin return @a end''''
when
''''IF'''' then
''''ALTER
FUNCTION ''''+ @objectName+''''(@a char(1)) returns table with encryption as return
select @a as a''''
end)
if
@type=''''V''''
set
@sql1=''''ALTER VIEW ''''+@objectname+'''' WITH ENCRYPTION AS SELECT 1 as f''''
set
@q=len(@sql1)
set
@sql1=@sql1+REPLICATE(''''-'''',4000-@q)
select
@sql2=REPLICATE(''''-'''',8000)
set
@sql3=''''exec(@sql1''''
select
@colid=max(colid) from #temp 上一页 [1] [2] [3] [4] [5] [6] [7] [8] 下一页 [其他]手工升级ACCESS到SQLSERVER方法详解 [Web开发]asp+sqlserver 分页方法(不用存储过程) [C语言系列]应用 SQLServer 链接服务器访问远程 Access 数据库 [C语言系列]如何在Jbuilder9中使用SQLServer JDBC驱动 [C语言系列]java与sqlserver2000的连接(最终版)! [C语言系列]一个简单的jsp连接sqlserver数据库的小实例 [VB.NET程序]在VB.NET中使用MS Access存储过程 — 第二部份 [VB.NET程序]在VB.NET中使用MS Access存储过程 — 第一部份 [Web开发]ADO中sqlserver存储过程使用 [Web开发]vc++中,用ado执行sql server存储过程,并且取得返…
|