ASP UPLOAD med text fields
Hvordan kan jeg oploade filer samtidig med tekst fields...Her er min kode:
<% Session("DB") = "DBQ=d:sti;DefaultDir=d:\sti;Driver={Microsoft Access Driver (*.mdb)};"
%> <%
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.SetMaxSize 290000, True
Upload.SaveVirtual("/log/")
For Each Item in Upload.Form
FileID = Item.Value
Next
For Each File in Upload.Files
File.ToDatabase Session("DB"), "insert into Attachments (AttachmentID, Path, Data) " &_
"values('"&FileID&"', '"&File.Path&"', ?)"
if Err <> 0 Then
Response.Write "Error saving the file: " & Err.Description
Else
File.Delete
Response.redirect("pickattachment.asp?ID=")&FileID
End If
Next
%>
