Do you like this article? Please, rate it and write review!
Rated:
by Aspin.com users
| |
| | Top messages |
| 5.2.2003 0:38:18 | |
| 22.3.2003 19:18:41 | |
| 4.5.2002 9:16:43 | |
Download recordset as a CSV (DBF, MDB) file | Areas>Languages>VBScript Areas>ASP / ASP.Net>Functions>Conversion | |
| You can use GetString method of recordset object to convert recordset (SQL query) to csv file :
Dim RS, SQL, Conn
SQL = "Some query ...."
Set RS = Conn.Execute (SQL)
Dim F, Head
For Each F In RS.Fields
Head = Head & ", " & F.Name
Next
Head = Mid(Head,3) & vbCrLf
Response.ContentType = "text/plain"
Response.Write Head
Response.Write RS.GetString(,,", ",vbCrLf,"")
|
See also Recordset convertor to download recordset data as DBF or MDB file. |
See also for 'Download recordset as a CSV (DBF, MDB) file' article: ASP/VBS, ADO and DBF file database connection. Short introduction to work with DBF files/databases in ASP/VBS/WSH envinronment. Work with DBF using Microsoft.Jet.OLEDB.4.0 provider. |
If you like this page, please include next link on your pages:
<A
Href="http://www.motobit.com/tips/detpg_RSConvert/"
Title="Enables download data from recordset (or
SQL query) as csv (DBF,
MDB file)."
>Download recordset as a CSV (DBF, MDB) file</A>
|
|