Ciao a tutti,
non riesco a capire dove sbaglio perché mi da errore e non mi aggiorna il db?
Questo è lerrore:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][Driver ODBC Microsoft Access] Errore di sintassi nell'istruzione UPDATE.
eppure mi sembra giusto...
e questo è il codice
<%
'Aggiorno in prodotto
If Request.QueryString("Save")="1" then
'If Request("Upload")="1" then
Dim oUpload
Set oUpload = new cUpload
oUpload.AutoRename = True
oUpload.Overwrite = False
oUpload.SetPath "files" 'Impostazione del percorso
oUpload.Load
While Not oUpload.EOF
oUpload.Save()
Select Case lCase(oUpload.Files("InputName"))
Case "image"
FileName_image = oUpload.GetFileName()
Case "bigimage"
FileName_bigimage = oUpload.GetFileName()
End Select
oUpload.MoveNext
Wend
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("aspProductCatalog.mdb")
Set Rs=server.CreateObject("ADODB.Recordset")
Rs.Open "Upload products Where ProductID="& oUpload.Form("id"),Conn,3,3
Rs.AddNew
Rs("productname") = oUpload.Form("productname")
Rs("Details") = oUpload.Form("Details")
Rs("ShortDetails") = oUpload.Form("ShortDetails")
Rs("data") = oUpload.Form("data")
Rs("argomento") = oUpload.Form("argomento")
Rs("Cliente") = oUpload.Form("Cliente")
Rs("CategoryID")= oUpload.Form("Category")
Rs("image") = FileName_image
Rs("bigimage") = FileName_bigimage
Rs.update
Rs.Close
Conn.Close
Set Rs = Nothing
Set Conn=Nothing
Set oUpload = Nothing
msg = "Il Prodotto è stato inserito correttamente"
End if
%>


Rispondi quotando
