| Object: | SoftArtisans.FileUp |
| Syntax: | SaveAsBlob ([in] ADOField) |
| Description: | This method saves an uploaded file to a database. AppendChunk method. Any OLEDB provider that supports the AppendChunk method
can be the destination of a SaveAsBlob. If there is more than one file being uploaded in a single page, only
the first one is saved. |
![]() |
Performance Considerations When Uploading to a Database In general, uploading to a database instead of a file is less efficient, both in terms of disk space and processor time. Due to the caching necessary when processing multiple form and file elements, the upload is saved to a file and then imported into the database. The temporary cache file is then deleted. Uploading to a database also consumes significant memory resources. It is possible that you will get errors like the following when uploading to a database: "There is insufficient system memory to run this query." Uploading to a database is best when there are many small files that you wish to catalogue, such as small graphic images. Large uploads are generally best stored in native files. |
<%
set rsBlob = Server.CreateObject("ADODB.Recordset")
rsBlob.Open "SimpleBlobTable", "AccessUpload", 2, 3
'---
'--- Add new record and update
'---
rsBlob.AddNew
upl.SaveAsBlob rsBlob.Fields("filecol")
rsBlob.Update
rsBlob.Close
Set rsBlob = Nothing
... %>
| Previous Page | Next Page |