guarda errore
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/admin/elimina.asp, line 59
guarda errore
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/admin/elimina.asp, line 59
aiuta quello che ho mandato prima?
qualche novità?
Prova.codice:... Cancellato = 'True'...
metto i puntini?
tolgo tutto il resto?
Gesù santo!!metto i puntini?VVoVe:
Devi solo modificare la stringa sql, inserendo tra la parola True i singoli apici.
non ho capito scusami se ti è possibile tieni presente che non capisco nulla di asp
E vuoi usare asp? Mah.
Comunque posta il codice della pagina, non come immagine (che ti obbliga a riscrivere se vuoi fare un quote o altro), ma come testo codificato (usa il tasto qui in alto #).
<%
'VERSIONE FILE 1.4.0
Option Explicit
%>
<%
Dim QSID, QSTabella, SQL, RS
QSID = Request.QueryString("ID")
QSTabella = Request.QueryString("Tabella")
If (QSID <> "") And (QSTabella <> "") And (LCase(QSTabella) <> "prodotti") And (LCase(QSTabella) <> "categorie") And (LCase(QSTabella) <> "scategorie") then
SQL = " DELETE FROM " & QSTabella & " WHERE ID = " & QSID
Set RS = Conn.Execute(SQL)
End If
If (LCase(QSTabella) = "scategorie") Then
SQL = " Select ID FROM Prodotti WHERE Cancellato = False AND SCategoria = " & QSID
Set RS = Conn.Execute(SQL)
If Not RS.Eof Then
Response.write "Errore: Non si possono cancellare categorie NON VUOTE. Cancellare tutti i sotto prodotti e le sottocategorie."
Response.End
Else
SQL = " Select ID FROM Categorie WHERE SCategoria = " & QSID
Set RS = Conn.Execute(SQL)
If Not RS.Eof Then
Response.write "Errore: Non si possono cancellare categorie NON VUOTE. Cancellare tutti i sotto prodotti e le sottocategorie."
Response.End
End If
End If
SQL = " DELETE FROM SCategorie WHERE ID = " & QSID
Set RS = Conn.Execute(SQL)
End If
If (LCase(QSTabella) = "categorie") Then
SQL = " Select ID FROM Prodotti WHERE Cancellato = False AND Categoria = " & QSID
Set RS = Conn.Execute(SQL)
If Not RS.Eof Then
Response.write "Errore: Non si possono cancellare categorie NON VUOTE. Cancellare tutti i sotto prodotti."
Response.End
End If
SQL = " DELETE FROM categorie WHERE ID = " & QSID
Set RS = Conn.Execute(SQL)
End If
If (LCase(QSTabella) = "prodotti") Then
SQL = " UPDATE Prodotti Set Cancellato = True = " & QSID
Set RS = Conn.Execute(SQL)
End If
Set RS = Nothing
Conn.Close
Set Conn = Nothing
Response.Redirect "ok.asp"
%>#
così va bene?
La stringa in grassetto è sbagliata. Stai cercando di valorizzare il campo "Cancellato" con due valori:codice:<% 'VERSIONE FILE 1.4.0 Option Explicit %> <% Dim QSID, QSTabella, SQL, RS QSID = Request.QueryString("ID") QSTabella = Request.QueryString("Tabella") If (QSID <> "") And (QSTabella <> "") And (LCase(QSTabella) <> "prodotti") And (LCase(QSTabella) <> "categorie") And (LCase(QSTabella) <> "scategorie") then SQL = " DELETE FROM " & QSTabella & " WHERE ID = " & QSID Set RS = Conn.Execute(SQL) End If If (LCase(QSTabella) = "scategorie") Then SQL = " Select ID FROM Prodotti WHERE Cancellato = False AND SCategoria = " & QSID Set RS = Conn.Execute(SQL) If Not RS.Eof Then Response.write "Errore: Non si possono cancellare categorie NON VUOTE. Cancellare tutti i sotto prodotti e le sottocategorie." Response.End Else SQL = " Select ID FROM Categorie WHERE SCategoria = " & QSID Set RS = Conn.Execute(SQL) If Not RS.Eof Then Response.write "Errore: Non si possono cancellare categorie NON VUOTE. Cancellare tutti i sotto prodotti e le sottocategorie." Response.End End If End If SQL = " DELETE FROM SCategorie WHERE ID = " & QSID Set RS = Conn.Execute(SQL) End If If (LCase(QSTabella) = "categorie") Then SQL = " Select ID FROM Prodotti WHERE Cancellato = False AND Categoria = " & QSID Set RS = Conn.Execute(SQL) If Not RS.Eof Then Response.write "Errore: Non si possono cancellare categorie NON VUOTE. Cancellare tutti i sotto prodotti." Response.End End If SQL = " DELETE FROM categorie WHERE ID = " & QSID Set RS = Conn.Execute(SQL) End If If (LCase(QSTabella) = "prodotti") Then SQL = " UPDATE Prodotti Set Cancellato = True = " & QSID Set RS = Conn.Execute(SQL) End If Set RS = Nothing Conn.Close Set Conn = Nothing Response.Redirect "ok.asp" %>
= True
= & QSID
Come è possibile?