Hi all
The following works for delet but not for write.
I changed err to error seemed to help but still does not write.?
<%on error resume next
set conn=Server.CreateObject("ADODB.Connection")
conn.provider="Microsoft.Jet.OLEDB.4.0"
conn.open(server.mappath("/fpdb/dbtest.mdb"))
if Request.form("action")="Save" then
ID=Request.Form("ID")
sql="UPDATE tblmaster SET Master_number='" & Request.Form("Master_number") & "',"
sql=sql & "Netdropship_item_no='" & Request.Form("Netdropship_item_no") & "',"
sql=sql & "mega_item_no='" & Request.Form("mega_item_no") & "',"
sql=sql & "sku='" & Request.Form("sku") & "',"
sql=sql & "amt='" & Request.Form("amt") & "',"
sql=sql & "international='" & Request.Form("international") & "',"
sql=sql & "EST_AVAIL='" & Request.Form("EST_AVAIL") & "' WHERE tblmaster.[ID]=" & ID
conn.Execute sql, Recordsaffected
if error <> 0 then
Response.Write("You do not have permission to update this database!")
else
Response.Write("Record number " & ID & " was updated.")
end if
end if
if Request.Form("action")="Delete" then
ID=Request.Form("ID")
conn.Execute "DELETE FROM tblmaster WHERE tblmaster.[ID]=" & ID, Recordsaffected
if error <> 0 then
Response.Write("You do not have permission to delete a record from this database!")
else
Response.Write("Record number " & ID & " was deleted.")
end if
Response.Write("Deleting records has been disabled from this demo")
end if
conn.close%>
Thanks
James
Write to access DB ASP need help
Don't know ASP but my guess would be the precedence of " and ' characters. That seems to be the key difference between your UPDATE and DELETE functions.
anything is possible - nothing is free

Blisster wrote:It *would* be brokeback bay if I in fact went and hung out with Skye and co (did I mention he is teh hotness?)
I have to admit that I do not know ASP either (just starting to delve into it), but, I would suggest from prior experience that you may want to recheck two things:
1 - the number of double and single quotes being used in the *save* section.
2 - the order and format of the *sql =* syntax, between the *ID=Request.Form("ID")* and the first *if error <> 0 then* statement in the same *save* section.
It just seems that there is something a bit out of place there.
1 - the number of double and single quotes being used in the *save* section.
2 - the order and format of the *sql =* syntax, between the *ID=Request.Form("ID")* and the first *if error <> 0 then* statement in the same *save* section.
It just seems that there is something a bit out of place there.
Rogue313
... old phone guy ...
... old phone guy ...