Edit Existing File
% verify fileID = fixsql(request.querystring("ID")) set objDB = OpenDatabase(true) SQL = "Select * from Files where ID = '" & fileID & "'" set rsFile = CreateRecordset(objDB, SQL) SQL = "Select ID, Category from Category1 where Active = 1 order by Category" set rsCategory1 = CreateRecordset(objDB, SQL) if rsFile("Category2ID") <> "" then SQL = "Select ID, Category from Category2 where Category1ID = '" & rsFile("Category1ID") & "' AND Active = 1 order by Category" set rsCategory2 = CreateRecordset(objDB, SQL) end if if rsFile("Category3ID") <> "" then SQL = "Select ID, Category from Category3 where Category2ID = '" & rsFile("Category2ID") & "' AND Active = 1 order by Category" set rsCategory3 = CreateRecordset(objDB, SQL) end if if rsFile("Category4ID") <> "" then SQL = "Select ID, Category from Category4 where Category3ID = '" & rsFile("Category3ID") & "' AND Active = 1 order by Category" set rsCategory4 = CreateRecordset(objDB, SQL) end if if rsFile("Category5ID") <> "" then SQL = "Select ID, Category from Category5 where Category4ID = '" & rsFile("Category4ID") & "' AND Active = 1 order by Category" set rsCategory5 = CreateRecordset(objDB, SQL) end if section = "Files" %>
Edit Existing File