% Set rs= Server.CreateObject("ADODB.Recordset") sql="select * from announce where popup=true and ischecked=true" rs.open sql,conn,1,1 if not rs.eof then %> <%end if%>