Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a file that I need to split into fields within records. I was hoping to split it into an single array for each record with the fields being each part of the array. The fields are separated with the pipe "|" system. The records are seperated by the "~" system. The field delimits aren't too bad, but I've never worked with a record delimiter. Any ideas on this? Thanks!

 

shootsnlad

Posted

How would I go about reading the whole file into a string? I know how to read a single line of the file into a string, but not the whole file. Would I use a StreamReader? I have the filename in a string but when I try to do the following, it doesn't recognize "file":

 

dim sr as system.io.streamreader
Sr = File.OpenText(filename)

 

Thanks...

Posted

Now comes the tricky part. How do I split up an indivdual field based on a Carriage Return? What do I put inside of the quotes for the Split function?

 

shootsnlad

  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...