Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Does anyone help me ? I just start a new job for 5 days. I was assiged to export the result of SQL query(MS ACCESS) as a text file (.txt) that consist of header (filed name) and line items (list of results) and specify the space between each of them. I know that MS ACCESS can export text file but he does want that format. In this case, I dont really know what to do. I dont want to be fired. please help me.

What I have tried:

export by using export ribbon.
Posted
Updated 1-Jul-18 6:19am

1 solution

This is very easy to do with a bit of work. If you can't do this yourself, you're not going to be in this job for very long.

This is just 3 simple steps. Build and execute the query to return a result set.

Iterate over the records returned (for loop of some kind) and get the next record from the returned result set.

Get the value from each field from the record and format it and write the fields to the file in the format required.


Having said that, if you think "helping you" means someone is going to write the code for you, you're already fired.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900