set @strFind='select * from ImageStore where ImageID='
set @strFind=@strFind+@FindID

解决方案 »

  1.   

    To:ppp80()我是想把where 后的条件从窗体传入数据库
      

  2.   

    create proc FindContent
    @FindID nvarchar(100)
    as
    declare @strFind nvarchar(500)
    set @strFind='select * from ImageStore where '
    set @strFind=@strFind+@FindID
    exec (@strFind)
      

  3.   

    CREATE proc FindContent
             @FindID nvarchar(100)
    as
        declare @strFind nvarchar(500)
        set @strFind='select * from ImageStore where ' +@FindID    exec sp_executesql @strFindGO
      

  4.   

    同意大象
    exec @strFind
    改为
    exec (@strFind)