整个库有34个存储过程,,大多数存储过程都不报错,只有少数几个报错。    求高手解答,,在线等!!! 急!!!
/*********************************************************************/
-----添加工程案例类别
if exists (select * from sysobjects where id = object_id(N'[InserPType]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [InserPType]   
go
create proc InserPType
@PtypeName varchar(100)
as
begin
insert into Ptype values(@PtypeName,getdate())
endexec InserPType '哦'
if exists (select * from sysobjects where id = object_id(N'[UpdatePType]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [UpdatePType]   
go
create proc UpdatePType
@PtypeID int,
@PtypeName varchar(100)
as
begin
update Ptype set PtypeName=@PtypeName,PtypeDate=getdate() where PTypeID=@PtypeID
endexec UpdatePType 2,'展览会'
if exists (select * from sysobjects where id = object_id(N'[DeletePType]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [DeletePType]   ---增加
go
create proc DeletePType
@PtypeID int
as
begin
delete Ptype where PTypeID=@PtypeID
endexec DeletePType 2
if exists (select * from sysobjects where id = object_id(N'[SelectPtypeList]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [SelectPtypeList]   ---增加
go
create proc SelectPtypeList
as
begin
select * from Ptype
endexec SelectPtypeListif exists (select * from sysobjects where id = object_id(N'[SelectPtypeObj]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [SelectPtypeObj]   ---增加
go
create proc SelectPtypeObj
@PtypeID int
as
begin
select * from Ptype where PTypeID=@PtypeID
endexec SelectPtypeObj 1if exists (select * from sysobjects where id = object_id(N'[InsertProjects]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [InsertProjects]   ---增加
go
create proc InsertProjects
@ProjectsName varchar(100),
@ProjectsContent varchar(max),
@ProjectsUrl char(100),
@ProjectsType int
as
begin
insert into Projects values(@ProjectsName,@ProjectsContent,@ProjectsUrl,@ProjectsType,getdate())
endexec InsertProjects 'zzzz,'zzzz,zzzz','~/ProjectsImage/1213.jpg',1if exists (select * from sysobjects where id = object_id(N'[UpdateProjects]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [UpdateProjects]   ---修改
go
create proc UpdateProjects
@ProjectsID int,
@ProjectsName varchar(100),
@ProjectsContent varchar(max),
@ProjectsUrl char(100),
@ProjectsType int
as
begin
update Projects 
set ProjectsName=@ProjectsName,ProjectsContent=@ProjectsContent,ProjectsUrl=@ProjectsUrl,ProjectsType=@ProjectsType,ProjectsDate=getdate()
where ProjectsID=@ProjectsID
endexec UpdateProjects 1,'zzzzz,'zzzzzz,zzzz,'~/ProjectsImage/1213.jpg',0if exists (select * from sysobjects where id = object_id(N'[DeleteProjects]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [DeleteProjects]  
go
create proc DeleteProjects
@ProjectsID int
as
begin
delete Projects where ProjectsID=@ProjectsID
endexec DeleteProjects 2if exists (select * from sysobjects where id = object_id(N'[SelectProjectsList]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [SelectProjectsList]  
go
create proc SelectProjectsList
as
begin
select * from Projects
endexec SelectProjectsListif exists (select * from sysobjects where id = object_id(N'[SelectProjectsLobj]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [SelectProjectsLobj]   
go
create proc SelectProjectsLobj
@ProjectsID int
as
begin
select * from Projects where ProjectsID=@ProjectsID
endexec SelectProjectsLobj 1
if exists (select * from sysobjects where id = object_id(N'[SelectProjectsByPtypeID]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [SelectProjectsByPtypeID]
go
create proc SelectProjectsByPtypeID
@PTypeID int
as
begin
select * from Projects where ProjectsType = @PTypeID
endexec SelectProjectsByPtypeID 1--if exists (select * from sysobjects where id = object_id(N'[DeletePType]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
--drop procedure [DeletePType]  
--go
alter proc DeletePType   
@PtypeID int
as
begin
if (select count(*) from Projects where ProjectsType=@PtypeID)>0
begin
delete Projects where ProjectsType=@PtypeID
delete Ptype where PTypeID=@PtypeID
end
else
begin
delete Ptype where PTypeID=@PtypeID
end
endcreate proc SelectPtypeListByPtyName
@PtypeName varchar(100)
as
begin
select * from Ptype where PtypeName like '%'+@PtypeName+'%'
endexec SelectPtypeListByPtyName '演'
create proc AddDtype
@DtypeName varchar(100)
as
begin
if (select count(*) from Dtype where DtypeName=@DtypeName)=0
begin
insert into Dtype values(@DtypeName,getdate())
end
end
exec AddDtype '用户使用手册'create proc DeleteDtype
@DTypeID int
as
begin
if(select count(*) from Download where DownloadType=@DTypeID)>0
begin
delete Download where DownloadType=@DTypeID
delete Dtype where DTypeID=@DTypeID
end
else
begin
delete Dtype where DTypeID=@DTypeID
end
end
create proc UpdateDtype
@DTypeID int,
@DtypeName varchar(100)
as
begin
update Dtype set DtypeName=@DtypeName,DtypeDate=getdate() where DTypeID = @DTypeID
end
goexec UpdateDtype 2,'用户帮助'create proc SelectDtype
@DTypeID int
as
begin
select * from Dtype where DTypeID=@DTypeID
end
goexec SelectDtype 2create proc SelectDtypeList
as
begin
select * from Dtype
end
goexec SelectDtypeListcreate proc SelectDtypeByDtypeName
@DtypeName varchar(100)
as
begin
select * from Dtype where DtypeName like '%'+ @DtypeName +'%'
end
goexec SelectDtypeByDtypeName '手'create proc AddDownload
@DownloadTitle varchar(100),        
@DownloadContent varchar(max),     
@DownloadDate varchar(100),         
@DownloadCount int,                 
@DownloadUrl varchar(max),          
@DownloadType  int
as
begin
if(select count(*) from Download where DownloadTitle=@DownloadTitle)=0
begin
insert into Download 
values(@DownloadTitle,@DownloadContent,@DownloadDate,@DownloadCount,@DownloadUrl,@DownloadType,getdate())
end
end
goexec AddDownload 'ssss','asdWEDQWEQWEQWWQDQWDAWED',100,1000,'awefrwerqawer',1create proc DeleteDownload
@DownloadID int
as
begin
delete Download where DownloadID=@DownloadID
end
goexec DeleteDownload 1create proc UpdateDownload
@DownloadID int,
@DownloadTitle varchar(100),
@DownloadContent varchar(max),
@DownloadDate varchar(100),
@DownloadCount int,
@DownloadUrl varchar(max),
@DownloadType  int
as
begin
update Download 
set DownloadTitle=@DownloadTitle,DownloadContent=@DownloadContent,DownloadDate=@DownloadDate,DownloadCount=@DownloadCount,DownloadUrl=@DownloadUrl,DownloadType=@DownloadType,DownloadDatetime=getdate()
where DownloadID=@DownloadID
end
goexec UpdateDownload 2,'sssswwwwwwwwww','asdWEDQWEQWEQWWQDQWDAWED',100,1000,'awefrwerqawer',1create proc SelectDownloadObjByID
@DownloadID int
as
begin
select * from Download where DownloadID=@DownloadID
end
goexec SelectDownloadObjByID 2create proc SelectAllDownloadList
as
begin
select * from Download order by DownloadDatetime desc
end
goexec SelectAllDownloadList
create proc SelectDownloadListByDtypeID
@PtypeID int
as
begin
select * from Download where DownloadType=@PtypeID order by DownloadDatetime desc
end 
goexec SelectDownloadListByDtypeID 1create proc SelectDownloadListByName
@DownloadTitle varchar(100)
as
begin
select * from Download where DownloadTitle like '%'+ @DownloadTitle +'%' order by DownloadDatetime desc
end
goexec SelectDownloadListByName 's'这是所有的存储过程!!!!所有报错的  都是从工程案例存储过程开始一直到下面的 都是报  超出了存储过程、函数、触发器或视图的最大嵌套层数(最大层数为 32)。
 
求解!!!!
在线等 
我的QQ 1093991777
谢谢!!!