Object for converting DAO or ADO recordset to the DBF file. It enables direct output of DBF files from the ASP page.
GetFile | Retrieves the recordset as a binary DBF data. | |
SaveRS | Saves the recordset as a DBF file |
Compress | Compress method or command line to real-time compress output file. |
String, RW | |
CurrencyDecimal | Decimal places for Currency field type |
Byte, RW | |
CurrencyWidth | Width for Currency field type |
Byte, RW | |
DoubleDecimal | Decimal places for Double field type |
Byte, RW | |
DoubleWidth | Width for Double field type |
Byte, RW | |
IntegerWidth | Width for Integer field type |
Byte, RW | |
LongVarCharWidth | Width for Long Variant Char field type |
Byte, RW | |
RowCount | Maximum recordset rows that RS Convert copies into a file. Zero means all recordset rows. |
Long, RW | |
SingleDecimal | Decimal places for Single field type |
Byte, RW | |
SingleWidth | Width for Single field type |
Byte, RW | |
TempDirectory | Temporary directory for creating output file. |
String, RW |
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> |
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