存储过程为:
Create Procedure killspid (@dbname varchar(20))
as
begin
declare @sql nvarchar(500)
declare @spid int
set @sql='declare getspid cursor for
select spid from sysprocesses where dbid=db_id('''+@dbname+''')'
exec (@sql)
open getspid
fetch next from getspid into @spid
while @@fetch_status<>-1
begin
exec('kill '+@spid)
fetch next from getspid into @spid
end
close getspid
deallocate getspid
endGO
怎么样在delphi里面把它写到sql-2000的master数据库里面啊???
Create Procedure killspid (@dbname varchar(20))
as
begin
declare @sql nvarchar(500)
declare @spid int
set @sql='declare getspid cursor for
select spid from sysprocesses where dbid=db_id('''+@dbname+''')'
exec (@sql)
open getspid
fetch next from getspid into @spid
while @@fetch_status<>-1
begin
exec('kill '+@spid)
fetch next from getspid into @spid
end
close getspid
deallocate getspid
endGO
怎么样在delphi里面把它写到sql-2000的master数据库里面啊???
解决方案 »
- delphi 的RTTI好用吗?
- 在Delphi做的服务里面是否可以定时查询Sql2005数据库,然后发送邮件?
- 想做一个类excel的工具,当然功能不一定要那么多,只要有基本功能(如:加边框,字体大小)
- 我想让一张图片转动?IMAGE图片框能否转动?
- 我有SUIPack3.9的源代码,有人要与我联系
- 怎样让dbgrid中记录指针移动时也不提交修改?
- 怎么样用Delphi生成xml文件
- 有高手愿意帮忙吗?
- 用VB 做的DLL,现在想用DELPHI使用其中的函数
- Delphi是否有象vb中的GetRows方法,将Recordset转化为Variant数组?
- 求救 各位哥哥给小妹拿个主意:高分酬劳
- 急寻加密方法,重金200分,分三次给
uses master
create Porcedure xx试试
如果存在会报错
捕捉错误信息
try
except