一直不行If code<>"" Then sql="select * from catalog where code like'"&code&"%' and len(code)=len('"&code&"')+2"Set Rs=GetRecordSet(sql)Function GetRecordSet (sql) 'response.write sql30 'response.end31 rs.Open sql,conn,1,3 Set GetRecordSet = rs[CODE]
sql="select * from catalog where code like '"&code&"%' and len(code)="&(len(code)+2)
这样看看
sql="select * from catalog where code like '%"&code&"%' and len(code)="&(len(code)+2)不明白你的 len(code)="&(len(code)+2) 是干嘛用的。。。。就是这里出错