标题:VB中存储过程的运用??????
只看楼主
liuwei1012
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2006-4-3
 问题点数:0 回复次数:0 
VB中存储过程的运用??????

PubSubShowData "hs_employee_show", "init", ""


CREATE procedure hs_employee_show
(
@OprtMode varchar(10),
@KeyValue varchar(20),
@Operator varchar(10)
)
as

declare @SqlStr varchar(400)

exec hs_public_getvalue @OprtMode,@KeyValue output,'Empl_No','hsEmployee_view',@SqlStr output

exec hs_public_log @Operator,'员工管理',@KeyValue,'See'

select '' as main
exec(@SqlStr)
GO



CREATE procedure hs_public_getvalue
(
@OprtMode varchar(10),
@KeyValue varchar(50) output,
@KeyField varchar(50),
@TableName varchar(50),
@SqlStr varchar(400) output
)
as
if @OprtMode='INIT'
begin
set @SqlStr='select top 1 * from '+rtrim(@TableName)+' where '+rtrim(@KeyField)+'<>'''' order by '+rtrim(@KeyField)+' desc'
exec('select top 1 '+@KeyField+' as KeyField into ##TempResult from '+@TableName+' where ''''">'+@KeyField+'<>'''' order by '+@KeyField+' desc')
end

此存储过程怎么理解...急急急!!!!此存储过程怎么理解...急急急!!!!此存储过程怎么理解...急急急!!!!此存储过程怎么理解...急急急!!!!此存储过程怎么理解...急急急!!!!此存储过程怎么理解...急急急!!!!此存储过程怎么理解...急急急!!!!

搜索更多相关主题的帖子: procedure 
2006-04-04 15:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-55027-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.145686 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved