<% Set theform = Server.CreateObject("SoftArtisans.FileUp") category1 = "'" & theform.form("category1") & "'" if category1 = "''" then category1 = "NULL" category2 = "'" & theform.form("category2") & "'" if category2 = "''" then category2 = "NULL" category3 = "'" & theform.form("category3") & "'" if category3 = "''" then category3 = "NULL" category4 = "'" & theform.form("category4") & "'" if category4 = "''" then category4 = "NULL" category5 = "'" & theform.form("category5") & "'" if category5 = "''" then category5 = "NULL" displayname = fixsql(theform.form("displayname")) description = fixsql(theform.form("description")) keywords = fixsql(theform.form("keywords")) restricted = theform.form("restricted") if restricted <> "" then restricted = replace(restricted, ",", "|") ID = theform.form("ID") set objDB = OpenDatabase(false) SQL = "Update Files set Category1ID = " & category1 & ", Category2ID = " & category2 & ", Category3ID = " & category3 & ", Category4ID = " & category4 & ", Category5ID = " & category5 & ", DisplayName = '" & displayname & "', Description = '" & description & "', Keywords = '" & keywords & "', Restricted = '" & restricted & "' where ID = '" & ID & "'" UpdateDB objDB, SQL if not trim(theform.Form("filename").UserFileName) = "" then theform.Path = Server.MapPath("\pdf") filename = Mid(theform.Form("filename").UserFilename, InstrRev(theform.form("filename").UserFilename, "\") + 1) theform.Form("filename").SaveAs theform.Path & "\" & filename SQL = "Update Files set Filename = '" & filename & "' where ID = '" & ID & "'" UpdateDB objDB, SQL end if objDB.close set objDB = nothing response.redirect("../files.asp") %>