| Export from ADO sample | |
|---|---|
<SCRIPT RUNAT=SERVER LANGUAGE=VBSCRIPT>
'Sets the content type
Response.ContentType = "application/x-msdownload"
'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")
'Sets parameters for Integer and Currency fields
DBF.IntegerWidth = 6
DBF.CurrencyDecimal = 2
DBF.CurrencyWidth = 6
'Open table
ADORS.Open "Payments", "DSN=ADOSamples"
'Write DBF file to the client
Response.BinaryWrite DBF.GetFile(ADORS)
'Close recordset
ADORS.Close
</SCRIPT> | |