Ciao,

riporto il mio codice che uso per eseguire due query:

[...]
strsql = "SELECT COUNT(*) as totale from utente where agenzia='" & agenzia & "' AND nazione ='" & nazione & "' AND citta ='" & citta & "'"

'DEFINISCO IL RECORDSET
set DBrec = Server.CreateObject("ADODB.Recordset")
DBrec.open strsql, Conn, , ,adCmdTable

'Se esiste già -> errore
if DBrec("totale") > 0 then
Response.Redirect("errore.asp?cod=92&ind=I")
end if

'Chiudo tutto
Set DBrec= nothing
DBrec.close


strsql = "INSERT INTO utente(....) VALUES (...)"

'Eseguo la query -> recorset creato prima
set DBrec2 = Server.CreateObject("ADODB.Recordset")
DBrec2.open strsql, Conn, , ,adCmdTable

'Chiudo tutto
Set DBrec2= nothing
DBrec2.close



Se levo i DBrec.close, funziona tutto ok, mentre se li lascio, ricevo il seguente errore:

Microsoft VBScript runtime error '800a01a8'

Object required: 'DBrec'

/registrazione_invia.asp, line 111


qualcuno sa dirmi come mai?..La riga dell' errore indica la DBrec.close

grazie