0
對不起,我的英語。記錄集rowcout -1
我用傳統的ASP,並嘗試打開記錄與下面的查詢
query = "SELECT "+_
"op.""ID"","+_
"replace(op.""FIO"",'""','\""') AS FIO, "+_
"replace(op.""Fax"",'""','\""') AS Fax, "+_
"replace(p.""Phone"",'""','\""')AS Phone, "+_
"replace(p.""INN"",'""','\""') AS INN, "+_
"replace(v.""ParentID"",'""','\""') AS ParentID, "+_
"replace(v.""Name"",'""','\""') AS Name, "+_
"replace(v.""ShortName"",'""','\""') AS ShortName, "+_
"replace(v.""AddIndex"",'""','\""') AS AddIndex, "+_
"replace(v.""StateID"",'""','\""') AS StateID, "+_
"replace(coalesce(p.""Address"",op.""LawAddress""),'""','\""') as ""Address"", "+_
"replace(coalesce(p.""ZIPCode"",op.""LawZIPCode""),'""','\""') as ""ZIPCode"", "+_
"replace(coalesce(p.""Country"",op.""LawCountry""),'""','\""') as ""Country"", "+_
"replace(coalesce(p.""Oblast"",op.""LawOblast""),'""','\""') as ""State"", "+_
"replace(coalesce(p.""City"",op.""LawCity""),'""','\""') as ""City"", "+_
"replace(coalesce(p.""Address"",op.""LawAddress""),'""','\""') as ""Street"", "+_
"replace(coalesce(p.""House"",op.""LawHouse""),'""','\""') as ""House"", "+_
"replace(op.""LawOffice"",'""','\""') as ""Office"""+_
" FROM "+_
" DBO.""LDOrgPartner"" op, "+_
" DBO.""LDPartner"" p, "+_
" DBO.""LDVocabulary"" v "+_
" WHERE "+_
" p.""ID""=op.""ID"" AND "+_
" v.""ID""=op.""ID"" AND "+_
" v.""ObjectTypeID"" in (19,44) "&wherePart
response.Write(query)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.PageSize=1000
rs.Open query, con
where wherePart="AND p."INN" LIKE '%38%'"
一切工作正常,但如果wherePart=" AND v."ShortName" LIKE '%ооо%'"
記錄行數是-1。在Management Studio與wherePart=" AND v."ShortName" LIKE '%ооо%'"
執行查詢返回900行