How do you process a .txt file and then parse it with string commands.

I am processing a text file that is approximately 4000 characters wide and about 4000 records long.  There is no seperation in the file.  I only know the start and stop positions for each field.  I need to extract each field into a variable and then write it to a SQL database.  Can someone give me some ideas on how to do perform this job.  Thanks for your help.

Who is Participating?
gregoryyoungConnect With a Mentor Commented:
well you will be reading it as a stream ... shows one ...

you could also use random access if you wanted wich will make things a bit easier in code ... gives an example of this, this method is nice because it reads directly into a structure.
kwh3856Author Commented:
Thanks for steering me in the right direction.  I found this link at Microsoft which was exactly what I needed.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.