salve ragazzi,
questo codice se mando in responsewrite la query di update ciclica nel for mi visualizza tante query quanti i campi checkbox del form selezionati quindi da 1 a x ma tolto il response.write e mandato in esecuzione l'execute appunto mi da errore e onestam,ente non capisco perchè... :master:
l'errore mi cade proprio sulla riga dell'execute ed è:codice:If (cint(flag)=0) then 'apro il db x aggiornare il valore set myConn = server.CreateObject("ADODB.Connection") dim strConnDb strConnDb = "" strConnDb = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " & server.mappath("/mdb-database/clienti.mdb") myConn.Open(strConnDb) for i=0 to ubound(Vettore) NomeCheck="Check" & Vettore(i) ValoreCheck= request(NomeCheck) Posizione=Vettore1(i) 'eseguo i controlli e l'update dim strInsertDati strInsertDati="" if (Procedura="Svuota Cestino") then NuovoStato = "Eliminato" if (ValoreCheck="on") then If (Posizione="M") Then strInsertDati="update Messaggi set VisMit=':1:' where id=" & Vettore(i) & "" else strInsertDati="update Messaggi set VisDes=':1:' where id=" & Vettore(i) & "" end if else end if end if if (Procedura="Ripristina Messaggi") then NuovoStato = "Si" if (ValoreCheck="on") then If (Posizione="M") Then strInsertDati="update Messaggi set VisMit=':1:' where id=" & Vettore(i) & "" else strInsertDati="update Messaggi set VisDes=':1:' where id=" & Vettore(i) & "" end if else end if end if strInsertDati=replace(strInsertDati,":1:",formatta_sql(cstr(Nuovostato))) myConn.Execute(strInsertDati) next myConn.Close set myConn=nothing response.redirect("Mess_cestino.asp") else response.redirect("Mess_cestino.asp?Errore=" & flag) end if
Microsoft JET Database Engine error '80040e0c'
Command text was not set for the command object.
/Mess_ripristinaecancella.asp, line 85
grazie![]()

Rispondi quotando

