Originariamente inviato da optime
e' corretto! prima della End If vedo un Exit Do....
scusa non ho capito, è corretto???

la cosa stranissima è che se provo a scrivere così, lo script funziona nel senso che "vede" tutti i records:
codice:
 Do Until Rec.Eof    
   
If Rec("IDCD") <> "" Then
   
   Rs.AddNew

    Rs("DATA")= Rs("DATA") 

........
      
    Rs.Update 
    
ELSE

Response.write "OK"

Set link = CreateObject("CDONTS.Newmail")
link.Body = messaggio
link.BodyFormat = 0 
link.MailFormat = 0 
link.Send
Set link = Nothing

exit do 
end if

    
    Rs.MoveNext   
    Loop     
       
end if