I am developing an application in which users can upload a file to a website and the contents of the file will be validated against the files record structure. The file has 4 different records in it, A header, A footer and two different record types in between.
Each file must start and end with a header and footer, and the two different record types in between have for the most part the same fields but in different locations.
What i need is to be able to read through and validate the file as wuickly as possible, im talking in a matter of only a few minutes.
What i have at the moment is a class that inherits a FileStream and reads through the file to the end parsing each line against a arrayList of field sizes into an array list, and it also validates each field as it goes.
What i want to know is if there is any quicker way of achieving this, because in itself it is very quick, but as soon as i start validating the fields as well (field input checks and checks against a database) the whole thing slows down dramatically.
At the moment when a user uploads a file to the server they have to go away and come back later when the application (which runs as a shell process in the background) has finished running. I would like the user to be able to upload the file and view the results within a couple of minutes.
Some tips an sample code on reading fixed length ascii files very quickly.
Mostly on a windows 2000 server and developed in [url removed, login to view]