Export Microsoft Access Database to Text File

cass84

New member
Joined
Aug 7, 2009
Messages
2
Programming Experience
Beginner
Hi, I'm using Visual Basic Express 2008 (VB.NEt). I've created a project which
connect to a Microsoft Access Database (OLEDB) & displays the records using textboxes in the windows app.

I need to add a button which exports the database to a fixed length text file. Does anyone know the code I would use to do this?
 
Since you've already got a DataTable I'd use a For Each loop and iterate over each DataRow in you DataTable.Rows. For each row I'd use an IO.StreamWriter to write out your fixed length line.
 

Latest posts

Back
Top