<% dim sql dim pathArray(5) dim fileArray(5) pathArray(0) = "renderings_hi" 'pathArray(1) = "renderings_md" pathArray(2) = "renderings_lo" pathArray(3) = "renderings_th" 'pathArray(4) = "renderings_zip" ' Create the FileUploader Dim Uploader, File Set Uploader = New FileUploader ' This starts the upload process Uploader.Upload() if Uploader.Form("submit") = "Insert" then '+++++++ INSERT +++++++ Dim a,i,key,path i=0 a=Uploader.Files.Keys For Each File In Uploader.Files.Items key=a(i) path = pathArray(cStr(key)) ' Save the file File.SaveToDisk "G:\Inetpub\abex.com\design_database\" & path & "\" fileArray(cStr(key)) = File.FileName i = i + 1 Next Set rsDesigns = Server.CreateObject("ADODB.Recordset") rsDesigns.ActiveConnection = MM_AbexDesignsNew_STRING sql = "INSERT INTO Table_Renderings (Project, Web_Product, Web_Budget, Price, Client, Web_Configuration, Web_Options, Renderings, Renderings_HI, Renderings_LO, Renderings_TH, Size, Web_Size, Industry, ryn) VALUES(" sql = sql + "'" + Uploader.Form("Project") + "', " sql = sql + "'" + Uploader.Form("Web_Product") + "', " sql = sql + "'" + Uploader.Form("Web_Budget") + "', " sql = sql + "'" + Uploader.Form("Price") + "', " sql = sql + "'" + Uploader.Form("Client") + "', " sql = sql + "'" + Uploader.Form("Web_Configuration") + "', " sql = sql + "'" + Uploader.Form("Web_Options") + "', " sql = sql + "'" + Uploader.Form("Renderings") + "', " sql = sql + "'" + fileArray(0) + "', " 'sql = sql + "'" + fileArray(1) + "', " sql = sql + "'" + fileArray(2) + "', " sql = sql + "'" + fileArray(3) + "', " 'sql = sql + "'" + fileArray(4) + "', " sql = sql + "'" + Uploader.Form("Size") + "', " sql = sql + "'" + Uploader.Form("Web_Size") + "', " sql = sql + "'" + Uploader.Form("Industry") + "', " sql = sql + "'" + Uploader.Form("ryn") + "') " ' Response.write ("
" + sql) rsDesigns.Source = sql rsDesigns.CursorType = 0 rsDesigns.CursorLocation = 2 rsDesigns.LockType = 1 rsDesigns.Open() Response.write "Record Updated Successfully" Response.end end if %>