Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have text files like these:
id,number
1,334455
2,454566
3,76434343
etc.
I need to copy the id and number's values into 2 fields in an access database.
How shall I do that in c#?

Thanks a lot.
Posted
Updated 25-Dec-10 1:56am
v2
Comments
fjdiewornncalwe 25-Dec-10 19:19pm    
If this is an interview or school question, perhaps it would be in your best interest to try and figure it out yourself first, and then post a question about where and how your process failed if it does. We don't like to make a practice of providing code for questions like this. You need to show us what went wrong and we'll help you get it right.

1 solution

1) Create a database and a table in MS Acess that includes 2 columns.
2) Open and read the text file in C#.
3) Using ADO.Net, open a connection and then insert data from the text file into the database table.

If you run into any issues while trying this, post them here and someone will help you.
 
Share this answer
 
Comments
Manfred Rudolf Bihy 25-Dec-10 9:31am    
Sounds sensible! 5+ :)

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