日期:2014-05-18 浏览次数:20498 次
declare @ID varchar(20) set @ID='2,3' --比如 select ','+cast(ID as varchar(20))+',' from Menu where ID like '%'+@ID+'%'
写这个事件 SelectedIndexChanged
declare @ID varchar(20) ,@sqlStr varchar(100) set @ID='2,3' --比如 set @sqlStr=' select '',''+cast(ID as varchar(20))+'','' from Menu where ID in ('+@ID+')'
------解决方案--------------------
exec (@sqlStr)