有个存储过程的问题要请教 下面两句中出现的 “SetFileName” 和 “addLine”被当作存储过程但是SQL中并没有找到这两个存储过程所以 EXEC @rt = SetFileName @szFileName Exec @rt = addLine @szText 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 exec sp_addextendedproc 'SetFileName', 'storeproc.dll'exec sp_addextendedproc 'addLine', 'storeproc.dll'goCREATE PROCEDURE sp_testdll ASdeclare @szFileName varchar(200)declare @szText varchar(200)declare @rt intSelect @szFileName = 'c:\welcome.txt'EXEC @rt = SetFileName @szFileNameif @rt = 0beginselect @szText = 'welcome 01'Exec @rt = addLine @szTextselect @szText = 'welcome 02'Exec @rt = addLine @szTextendgoexec sp_dropextendedproc 'SetFileName'exec sp_dropextendedproc 'addLine'dbcc SetFileName(free)dbcc addLine(free) exec sp_addextendedproc 'SetFileName', 'storeproc.dll'exec sp_addextendedproc 'addLine', 'storeproc.dll'goCREATE PROCEDURE sp_testdll ASdeclare @szFileName varchar(200)declare @szText varchar(200)declare @rt intSelect @szFileName = 'c:\welcome.txt'EXEC @rt = SetFileName @szFileNameif @rt = 0beginselect @szText = 'welcome 01'Exec @rt = addLine @szTextselect @szText = 'welcome 02'Exec @rt = addLine @szTextendgoexec sp_dropextendedproc 'SetFileName'exec sp_dropextendedproc 'addLine'dbcc SetFileName(free)dbcc addLine(free) to pengdali(大力 V2.0) 请问我把原来的改成Create PROCEDURE sp_testdll ASdeclare @szFileName varchar(200)declare @szText varchar(200)declare @rt intSelect @szFileName = 'c:\welcome.txt'EXEC @rt = SetFileName @szFileNameif @rt = 0beginselect @szText = 'welcome 01'Exec @rt = addLine @szTextselect @szText = 'welcome 02'Exec @rt = addLine @szTextend现在他还是出错啊提示是不能在事务内部执行过程sp_addextendedproc,未能找到存储过程SetFileName 语句已经中止exec sp_addextendedproc 'SetFileName', 'storeproc.dll'exec sp_addextendedproc 'addLine', 'storeproc.dll'我已经提前执行了啊 查询语句优化问题 多表查询中的排除列查询方法 关于一个表的设计的性能和合理问题 问一个电子相册的问题 求sql语句 求sql语句!在线等待!谢谢 sql2005 新建数据库时没有E盘怎么回事 如何CAST或CONVERT到特定的格式? 请问大家;如何实现模糊查询? 求教字符串转日期的问题 为什么我的存储过程(在查询分析器)里面调试时会走不下去? 怎么用SQL语句往一个表中添加一列?
exec sp_addextendedproc 'addLine', 'storeproc.dll'
go
CREATE PROCEDURE sp_testdll ASdeclare @szFileName varchar(200)
declare @szText varchar(200)
declare @rt intSelect @szFileName = 'c:\welcome.txt'EXEC @rt = SetFileName @szFileName
if @rt = 0
begin
select @szText = 'welcome 01'
Exec @rt = addLine @szText
select @szText = 'welcome 02'
Exec @rt = addLine @szTextend
go
exec sp_dropextendedproc 'SetFileName'
exec sp_dropextendedproc 'addLine'dbcc SetFileName(free)
dbcc addLine(free)
exec sp_addextendedproc 'addLine', 'storeproc.dll'
go
CREATE PROCEDURE sp_testdll ASdeclare @szFileName varchar(200)
declare @szText varchar(200)
declare @rt intSelect @szFileName = 'c:\welcome.txt'EXEC @rt = SetFileName @szFileName
if @rt = 0
begin
select @szText = 'welcome 01'
Exec @rt = addLine @szText
select @szText = 'welcome 02'
Exec @rt = addLine @szTextend
go
exec sp_dropextendedproc 'SetFileName'
exec sp_dropextendedproc 'addLine'dbcc SetFileName(free)
dbcc addLine(free)
请问我把原来的改成
Create PROCEDURE sp_testdll ASdeclare @szFileName varchar(200)
declare @szText varchar(200)
declare @rt intSelect @szFileName = 'c:\welcome.txt'EXEC @rt = SetFileName @szFileName
if @rt = 0
begin
select @szText = 'welcome 01'
Exec @rt = addLine @szText
select @szText = 'welcome 02'
Exec @rt = addLine @szTextend
现在他还是出错啊
提示是不能在事务内部执行过程sp_addextendedproc,
未能找到存储过程SetFileName
语句已经中止
exec sp_addextendedproc 'SetFileName', 'storeproc.dll'
exec sp_addextendedproc 'addLine', 'storeproc.dll'
我已经提前执行了啊