换几种语句试试
语句1
Dim rs
Set rs=conn.Execute("select * from cdw where dw<>'办公室')
IF Not rs.EOF Then
Response.Write "错误有记录不为办公室"
End IF
语句2
Dim rs
Set rs=Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from cdw where dw<>'办公室'",1,3
IF rs.reocrdcount<>0 Then
Response.Write "错误有记录不为办公室"
End IF