create the text file programatically

jessiang

Member
Joined
Jun 6, 2006
Messages
8
Programming Experience
Beginner
hai,

i have face a problem that i need to store multiple address in a table but will only save into it if the new account success add in.
i was thinking to create new and save it in the text file which is in same directory as the application was. if the account successfully added then we only take the data from the text file and save it into database table.
can anyone help me how to create a new text file into the application directory, and how to take the data from text file into table but i don't want to use other the table to act as text file

thanks
 
The actula coding to create a text file can be done in numerous ways, but basically you create a StreamWriter object and pass the path of the file you want to create, then call WriteLine to write a line of text. Similarly you use a StreamReader to read a text file.
 
Back
Top