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

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

Description

Object for converting DAO or ADO recordset to the DBF file. It enables direct output of DBF files from the ASP page.

Methods

GetFile Retrieves the recordset as a binary DBF data.
SaveRS Saves the recordset as a DBF file

Properties

CompressCompress method or command line to real-time compress output file.
String, RW
CurrencyDecimalDecimal places for Currency field type
Byte, RW
CurrencyWidthWidth for Currency field type
Byte, RW
DoubleDecimalDecimal places for Double field type
Byte, RW
DoubleWidthWidth for Double field type
Byte, RW
IntegerWidthWidth for Integer field type
Byte, RW
LongVarCharWidthWidth for Long Variant Char field type
Byte, RW
RowCountMaximum recordset rows that RS Convert copies into a file. Zero means all recordset rows.
Long, RW
SingleDecimalDecimal places for Single field type
Byte, RW
SingleWidthWidth for Single field type
Byte, RW
TempDirectoryTemporary directory for creating output file.
String, RW

Examples

Simple code to create DBF and write from ASP

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

  'Write DBF file to the client
  Response.BinaryWrite DBF.GetFile(ADORS)
  
  'Close recordset
  ADORS.Close
</SCRIPT>

Other links for DBF 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