FileManager Samples

Importing/Exporting Files as BLOBs to or from a Database

Setup Instructions

 

We supply a sample Access Database as well as SQL Server Scripts that will create tables that you can use for saving Blobs to.

We highly recommend using Microsoft MDAC 2.1 or later if you intend to perform significant database BLOB (Binary Large OBject - i.e. a file) manipulations. MDAC is available for free download from http://www.microsoft.com/data for IIS 3 and IIS 4. MDAC encompasses all previous Microsoft data components such as ADO, OLEDB, and the latest ODBC drivers. In our experience versions 2.0 and up are much more reliable for BLOB manipulations than earlier versions of ADO.

Setup Instructions for Microsoft Access

  1. Find the UPLOAD.MDB file contained in the same directory as this file.
  2. Open the ODBC Data Source Administrator (located in the Control Panel).
  3. Click on the "System DSN" tab.
  4. Select "Add...".
  5. Select "Microsoft Access Driver (*.MDB)".
  6. Click on "Finish".
  7. Enter a Data Source name of "AccessUpload".
  8. Click on "Select..." and navigate to the location of the UPLOAD.MDB file.
  9. Click on "OK" and your database is ready to use.

 

Setup Instructions for SQL Server

  1. Find the UPLOAD.SQL file contained in the same directory as this file.
  2. Ensure that you have a properly configured System Data Source using the ODBC Data Source Administrator or ensure that you have a database that is accessible from IIS.
  3. From a command window, create the necessary tables in your database. For example:
    C> isql -d <mydatabase> -i upload.sql -Usa -P
      
  4. Modify the samples to use the SQL Server database rather than Access. There are two files to be modified: "DataBaseBlob\import.asp" and "DataBaseBlob\export.asp". In both files, look for the string beginning "For SQL Server Users".
  5. Comment out the Access-based rsBlob.Open.
  6. Un-comment the SQL Server-based rsBlob.Open.

Back to the samples page

 

Previous Page Next Page