ahmedsoliman
04-14-2003, 01:58 PM
when using upload opject, is it must to use for next to get the file or files.
the same with any item in my form beside the files, can i requst each item alone without for next.
i have the following code supported from my host:
Set Upload = Server.CreateObject ("Persits.Upload.1")
' Upload files
Upload.OverwriteFiles = False ' Generate unique names
Upload.SetMaxSize 1048576 ' Truncate files above 1MB
Upload.SaveVirtual "/data" ' Save to data directory
' Process all files received
For Each File in Upload.Files
' Save in the database as blob
File.ToDatabase "DSN=userid.dsn_name;UID=user_id;PWD=account_Password;",_
"insert into uploadTable (id, FilePath, image)values (12, '" & File.Path & "',?)"
Next
For Each Item in Upload.Form
If Item.Name = "Category" Then
Response.Write Item.Value & "<BR>"
End If
Next
Set Upload = Nothing
the same with any item in my form beside the files, can i requst each item alone without for next.
i have the following code supported from my host:
Set Upload = Server.CreateObject ("Persits.Upload.1")
' Upload files
Upload.OverwriteFiles = False ' Generate unique names
Upload.SetMaxSize 1048576 ' Truncate files above 1MB
Upload.SaveVirtual "/data" ' Save to data directory
' Process all files received
For Each File in Upload.Files
' Save in the database as blob
File.ToDatabase "DSN=userid.dsn_name;UID=user_id;PWD=account_Password;",_
"insert into uploadTable (id, FilePath, image)values (12, '" & File.Path & "',?)"
Next
For Each Item in Upload.Form
If Item.Name = "Category" Then
Response.Write Item.Value & "<BR>"
End If
Next
Set Upload = Nothing