Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Export from to csv file

Posted on 2013-06-05
Medium Priority
Last Modified: 2013-06-06
Does anyone know how to export the results of a query to a csv file in 4.0?

Question by:ajdarlow
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

MrC63 earned 500 total points
ID: 39223117
The File System Object (fso) is one way to do it.  See the following link:
LVL 42

Expert Comment

ID: 39224748
can u post the code u use to query the results?
are you getting datatable/dataset as results or datareader?
LVL 70

Accepted Solution

Éric Moreau earned 500 total points
ID: 39225203

Author Closing Comment

ID: 39225269
Thanks guys.

In the end I used the following


        mySqlDataAdapter.Fill(myDataSet, "Tags")
        For Each myDataRow In myDataSet.Tables("Tags").Rows
            strText = myDataRow("TagId") & ", " & myDataRow("TagDesc") & vbCrLf
            My.Computer.FileSystem.WriteAllText(strFileName, strText, True)
        Next myDataRow

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question