Hi,<BR> <BR>I was wondering if someone can help.<BR><BR>I found this code on the web to output an asp recordset to a csv file.<BR><BR>http://www.psacake.com/web/fo.asp<BR><BR>The code only outputs the recordset to the users browser and the user has to manually save to file - specifying file name and file type.<BR><BR>What I would like to do is adapt it to ouput a recordset to <BR>a users browser with the column headings to a file name of their choice.<BR><BR>&#060;%Dim RS,SQL,db<BR><BR>&#039;Create a database connection<BR><BR>strMyDSN=strDSN<BR>Set db = Server.CreateObject("adodb.connection")<BR>db.Open strMyDSN<BR><BR>SQL = mySQL<BR>Set RS = db.Execute (SQL)<BR><BR><BR>&#039;Response.Write Head<BR>&#039;Response.Write RS.GetString(,,", ",vbCrLf,"")<BR><BR>Dim F, Head<BR>For Each F In RS.Fields<BR> Head = Head & ", " & F.Name<BR>Next<BR>Head = Mid(Head,3) & vbCrLf<BR>Response.ContentType = "text/plain"<BR>Response.Write Head<BR>Response.Write RS.GetString(,,", ",vbCrLf,"")%&#062;<BR><BR>Can anyone help?<BR><BR>Cheers<BR><BR>Mark :)