Jump to content

exporting database (table) to a text file.

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Str1k3z

Str1k3z

    Newbie

  • Members
  • Pip
  • 1 posts
hello,

could anyone tell me how i could export data from my database (ado.net) to a text-file. Data being the three tables it exists of, or only one table. Which data gets exported doenst really matter, but I really need to know how to export it. I'm at the edge of giving up on it, but i'd like to crack this one :P

Further details:
I've made a database, containing three tables: purchases, costumers and emplyees. I've made a double and tripple dataview work, and i can safely add and delte data. I've made a slideshow with images from the database run in the background of my MDI parent. Now I only need to be able to export the data of a certain table or the entire database to a text file...

Any help would be greatly appreciated!

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Can you display the data in your application? If so, it's a simple matter of iterating through the data and writing each line to a text file.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Guest_Jordan_*

Guest_Jordan_*
  • Guests
If you are already connected using ADO, it is a simple matter of running a select statement and looping through that data. While looping through each row just use FileWriter and send the info to a text file.