Re: Flat File Reading

From: mwazir (mwazir_ns_at_vsnl.com)
Date: 06/04/04


Date: Fri, 4 Jun 2004 17:25:38 +0100

Hi Andrew,

How about something like this

Dim oStream As New IO.StreamReader("c:\myfilename.txt")

Dim strReadLine as string

While (oStream.Peek() > -1)
     strReadLine = oStream.ReadLine()
     Debug.Writeline("Record 1: " & Strings.left(strReadLine, 10)
     Debug.Writeline("Record 1: " & Strings.right(strReadLine, 10)
End While

HTH

-- 
Wazir
"Andrew" <ashushujev@solidnull.com> wrote in message
news:e8b111df.0406040802.64a69d58@posting.google.com...
> Hi,
>
> I have a flat file with fixed length data all in continuous form with
> two records shown below
>
> 01500 345202600 4939
>
> output required in readable format with two records:
>
> Record 1: 01500 3452
> Record 2: 02600 4939
>
> Im puzzled with ReadLine() function in VB.NET in splitting above line
> into two records and then processing each one in turn.
>
> I would appreciate any help in this matter.
>
>
> Andrew


Relevant Pages

  • FS: Hippner 8 String Cedar/Coco $3000+ship
    ... Here goes...This is the guitar I bought off Andrew Schulman a few ... for 2 months and working hard on my David Daily 6 string and now I ... Very nice guitar though. ... VERY EASY to play as far as action. ...
    (rec.music.classical.guitar)
  • Re: BSTR* marshalling
    ... "Andrew Merisanu" wrote in message ... > Hey Peter, ... >> Call it from your managed code after youve got the string e.g. ... >> Public Shared Function SysFreeString(ByVal ptr As Ptr) As Integer ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: how to convert KB to MB
    ... Andrew J. Kelly SQL MVP ... concatenate the value with the string 'MB'. ... --Error converting data type varchar to float. ...
    (microsoft.public.sqlserver.clients)
  • Re: Date Transformation from YYYYMMDD - yet another question
    ... If this is going to a staging table then you can import it as a string and ... Andrew J. Kelly SQL MVP ... >> Andrew J. Kelly SQL MVP ... > I first tried doing it without the ActiveX transformation. ...
    (microsoft.public.sqlserver.dts)
  • Re: JTree application
    ... Andrew T. wrote: ... I'D like to have the string separated in 2 parts, ... "THIS IS" should be bold face, ... public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) { ...
    (comp.lang.java.programmer)

Quantcast