Dear All,
I am a newbie to VB.Net. I trying to get my (VB.Net) app to read from a text file and manipulate the read data and write the output to another text file. I can do it using VB6 and VBA, but not in VB.Net. I have a few questions I need sorted out.
1) what is the diff between fileopen and streamreader?
2) how do I use streamreader to read a line of text with a series of variables demilited by comma and then separated in different variables without using the split function?
3) how do I use streamwriter to do the reverse ie write a series of variables to a line of text and separated by commas?
4) I have declared a number of variables as various types eg long, integer, single, string etc. I would get an error message if the variables are of different type to the value being read and more importantly if a value is blank ie field is blank in the input file it would also return an error message. How do I get around this?
Your help and suggestions are greatly appreciated.
TIA
I am a newbie to VB.Net. I trying to get my (VB.Net) app to read from a text file and manipulate the read data and write the output to another text file. I can do it using VB6 and VBA, but not in VB.Net. I have a few questions I need sorted out.
1) what is the diff between fileopen and streamreader?
2) how do I use streamreader to read a line of text with a series of variables demilited by comma and then separated in different variables without using the split function?
3) how do I use streamwriter to do the reverse ie write a series of variables to a line of text and separated by commas?
4) I have declared a number of variables as various types eg long, integer, single, string etc. I would get an error message if the variables are of different type to the value being read and more importantly if a value is blank ie field is blank in the input file it would also return an error message. How do I get around this?
Your help and suggestions are greatly appreciated.
TIA