Exw auton to kwdika se ena arxeio asp kai to xrhshmopoiw gia na kanw edit kai delete se kapoies egrafes se mia bash dedomenon. An kai to delete douleuei kanonika otan trexw to edit mou bgazei ena munhma sfalmatos gia thn suntaksi tou update. Kserei kaneis pou yparxei lathos?
Autos einai o kwdikas:
Submit to Database
<%
Set conn = server.CreateObject("ADODB.Connection")
conn.provider = "Microsoft.Jet.OLEDB.4.0"
conn.Open (server.mappath("db1.mdb"))
If Request.form("action") = "Save" Then
UserID = Request.form("UserID")
sql = "UPDATE users SET Username='" & Request.form("Username") & "',"
sql = sql & "Password='" & Request.form("Password") & "',"
sql = sql & "Fysikh='" & Request.form("Fysikh") & "',"
sql = sql & "Hlektronika='" & Request.form("Hlektronika") & "',"
sql = sql & "Thlematikes='" & Request.form("Thlematikes") & "',"
sql = sql & " WHERE users.[UserID]=" & UserID
conn.Execute sql,RecordsAffected
If Err <> 0 Then
Response.write ("You do not have permission to update this database!")
Else
Response.write ("Record number " & UserID & " was updated.")
End If
End If
If Request.form("action") = "Delete" Then
UserID = Request.form("UserID")
conn.Execute "DELETE FROM users WHERE users.[UserID]=" & UserID, Recordsaffected
If Err <> 0 Then
Response.write ("You do not have permission to delete a record from this database!")
Else
Response.write ("Record number " & UserID & " was deleted.")
End If
End If
conn.close%>
Απάντησε με το error.
Δώσε modify άδειες στον IUSER ή στoν everyone από τον NTFS
tip: Web hosting Unix με Bandwith + Disk space Απεριόριστο μόνο 2.30 € * F5 για νέο tip