if not conn is nothing then
   if conn.static =1 then conn.close
   set conn=nothing
end if