就不要where 语句不行吗?

解决方案 »

  1.   

    dim tmp_where as string
    if trim(sptl)="" then
        tmp_where=""
    else
        tmp_where=" and pccode='"& sptl &"'"
    end ifstrsql=" SELECT pccode AS 电脑编码, shname AS 投资人, shcfcode AS 身份生号码, 
            shhome AS 家庭住址, shmoney AS 投资额
            FROM shareholder where 1=1 " & tmp_where
      

  2.   

    我想要在不修改sql语句的情况下做到!