if @GetUserId != '' and @GetUserId is not null
    set @strWhere = @strWhere +  ' and come_userid =  ' +@GetUserIdif @GetGameId != '' and @GetGameId is not null
    set @strWhere = @strWhere +  ' and come_gameid =  ' +@GetGameIdif @GetSiteId != '' and @GetSiteId is not null
    set @strWhere = @strWhere +  ' and come_siteid =  ' +@GetSiteId

解决方案 »

  1.   

    很感谢楼上的朋友的热情,但改了下还是报错!URL:http://site.1limi.com/test.asp
      

  2.   

    变量类型不对.你可以把程序中的参数,代入存储过程,输出存储过程的执行SQL
      

  3.   

    输出这个 @strSQL 变量值~~~
      

  4.   

    能不能告知我在ASP中怎么输出@strSQL ?
    我刚接触过程这,多谢了
      

  5.   

    if @GetUserId != ''
        set @strWhere = @strWhere +  ' and come_userid =  ' +rtrim(@GetUserId)if @GetGameId != ''
        set @strWhere = @strWhere +  ' and come_gameid =  ' +rtrim(@GetGameId)if @GetSiteId != ''
        set @strWhere = @strWhere +  ' and come_siteid =  ' +rtrim(@GetSiteId)
      

  6.   

    现在可以使用啦,感谢zlp321002的热心和jacobsan的帮助!
    还有一个问题就是,这个过程中,我怎么才能取到记录集呢?
    ASP里又该怎么取?