Prova così:
codice:
'Preparo una query per verificare se immobili già inserito prendendo cognome, via, civ, int, contratto
strsql = "SELECT * from immobili where cognome='" & cognome & "' AND app_via ='" & app_via & "' AND app_civ ='" & app_civ & "' AND app_int ='" & app_int & "' AND contratto='" & contratto & "'"
response.write strsql
'DEFINISCO IL RECORDSET
set DBrec = Server.CreateObject("ADODB.Recordset")
DBrec.open strsql, Conn
if rs.eof then
response.write("Nessuna informazione presente in tabella")
else
CICLI IL RECORDSET E RECUPERI LE INFORMAZIONI
end if