Click here to Skip to main content
16,017,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
On clicking button i should write records in to text file from mysql database. If file contains some data it should erase...Hope u ll reply soon
Posted

1 solution

You can read those link to see how to get data from my sql in c#
Click

Click

After get the data from the database, you can easily write records to text file.
string OutputFile = "a.txt";
string output = "1\n2\n3";
File.WriteAllText(OutputFile, output);

You can do this operations in the button click event.
 
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