本帖最后由 dh2981 于 2013-09-13 10:16:35 编辑

解决方案 »

  1.   

    try this,set rs_t=server.CreateObject("ADODB.recordset")
    TXT0="房"
    TXT1="1";
    sql="SELECT [LOCATION] FROM [PWNT].[dbo].[READER] where charindex('" & TXT0 & "',[LOCATION],1)>0 "rs_t.open sql,conn,1,3
    do while not rs_t.eof
          response.Write(rs_t("LOCATION"))    
    rs_t.movenext
    loop
    rs_t.close
    set rs_t=nothing
      

  2.   

    try this,set rs_t=server.CreateObject("ADODB.recordset")
    TXT0="房"
    TXT1="1";
    sql="SELECT [LOCATION] FROM [PWNT].[dbo].[READER] where charindex(N'" & TXT0 & "',[LOCATION],1)>0 "
     
    rs_t.open sql,conn,1,3
    do while not rs_t.eof
          response.Write(rs_t("LOCATION"))    
    rs_t.movenext
    loop
    rs_t.close
    set rs_t=nothing
      

  3.   

    READER.LOCATION字段是nvarchar(64),
    查询时须在查找字符串前加"N",指定为unicode数据.