codice:
if not rso.eof then
	inserite =RSO("INSERITE")
else
	inserite = 0
end if
...dipende anche dal contesto.