MOTOBIT.COM - ASP upload, IIS utility MDB Class, ASP/VBScript MDB database file convert and export., Member of RSConvert

Member of  RSConvert Use MDB object | Changes | Purchase | Download

Description

Object for converting DAO or ADO recordset to the MDB file. Faster than DBF, MDB enables distribute large binary and text fields.

Methods

AddRS Adds a recordset as a table to the MDB file.
GetBinary Returns the MDB file as binary.
GetFile Retrieves the recordset as a binary MDB data. If the Compress is specified, GetFile returns output of the compress program.

Properties

CompressCompress method or command line to real-time compress output file. Specifies one of predefined values (pkzip.exe, arj.exe) or full command line for compress program. GetFile and GetBinary methods calls the program after create database.
String, RW
OptionsFormat of output MDB file.
DatabaseTypeEnum, RW
RowCountMaximum recordset rows that RS Convert copies into a file. Zero means all recordset rows.
Long, RW
TempDirectoryTemporary directory for creating output file.
String, RW
DBFileNameReturns FileName of the MDB database.
String, RO

Examples

Send two recordsets in MDB

<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
  'Sets the content type
  Response.ContentType = "application/vnd.ms-access"
  'Specify filename for download
  Response.AddHeader "Content-Disposition", "attachment;filename=Results.MDB"
  
  'Create RecordSet and MDB objects
  Set ADORS = CreateObject("ADODB.Recordset")
  Set MDB = CreateObject("RSConvert.MDB")
  
  'Open table Orders
  ADORS.Open "Orders", "DSN=ADOSamples"
  'Add table "Orders" to database
  MDB.AddRS ADORS
  ADORS.Close

  'Open table Payments
  ADORS.Open "Payments", "DSN=ADOSamples"
  'Add table "Payments" to database
  MDB.AddRS ADORS
  ADORS.Close

  'Write MDB file to the client
  Response.BinaryWrite MDB.GetBinary
  
</SCRIPT>

Other links for MDB class

Recordset converter classes

DBF, MDB

Recordset converter enums

DatabaseTypeEnum

RSConvert

      Recordset converter is a library for converting DAO or ADO recordsets to MDB or DBF files. It enables direct binary output of MDB or DBF files from ASP pages with one row of code. The object also supports on-the-fly compression by zip/arj.

© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz