Question: how to export data from database to text file in vb.net?
Answer: First, declare a dataTable/dataset (I would prefer DataTable) to hold your query result from DB. Then loop through the datatable rows and get the data append into a string builder(or any other way you like to build your string) Then append the string into the txt file.