D
Daniel Freedman
Hi,
I'm trying to learn vb.net and have the following scenario I want to
handle:
I'm importing data from a csv file into a dataset. Some of the data is
inconsistent and throws an invalidargument error. What I want to do
with this data is write it to another text file instead of importing
it to the dataset. At the end of the import routine the dataset will
contain all the valid data, and the invalid data will be in another
text file for the user to correct and reprocess.
I can cope with all the reading/writing/catching stuff, but I want to
know if it's possible to continue with the main import code in the try
block once the error has been caught and handled. And if so, how?
So far all I can tell from try...catch...finally blocks is that the
catch block can trap an error and tell the user about it. I can't see
how to get it to fix (or ignore) the error and continue with the main
block of code.
Thanks in advance
Daniel
I'm trying to learn vb.net and have the following scenario I want to
handle:
I'm importing data from a csv file into a dataset. Some of the data is
inconsistent and throws an invalidargument error. What I want to do
with this data is write it to another text file instead of importing
it to the dataset. At the end of the import routine the dataset will
contain all the valid data, and the invalid data will be in another
text file for the user to correct and reprocess.
I can cope with all the reading/writing/catching stuff, but I want to
know if it's possible to continue with the main import code in the try
block once the error has been caught and handled. And if so, how?
So far all I can tell from try...catch...finally blocks is that the
catch block can trap an error and tell the user about it. I can't see
how to get it to fix (or ignore) the error and continue with the main
block of code.
Thanks in advance
Daniel