pro_vb thread: RE: Program Freeze... Help Urgent! (new question, same subject)
thanks (to Stuart too... :) )
Gonzalo Martin Bianchi
Desarrollo de sistemas de cuenta corriente tributaria
Hipolito Yrigoyen 370
Entrepiso B pasillo 600 oficina 5
4347-3181
----- Original Message -----
From: "John Stendor" <john.stendor@c...>
To: "professional vb" <pro_vb@p...>
Sent: Tuesday, August 27, 2002 4:30 PM
Subject: [pro_vb] RE: Program Freeze... Help Urgent! (new question, same
subject)
> MS Run Script
>
> Gonzalo Martin Bianchi wrote:
> >
> > what librarys I had to add to use the filesystemobject in VB6???
> >
> > thanks...
> >
> > Gonzalo Martin Bianchi
> > ----- Original Message -----
> > From: "Matt Morgan" <mattmorgan@p...>
> > To: "professional vb" <pro_vb@p...>
> > Sent: Tuesday, August 27, 2002 11:18 AM
> > Subject: [pro_vb] RE: Program Freeze... Help Urgent!
> >
> > Sidney -
> >
> > It's been a long time since I worked with flat files, and even then only
in
> > C, never VB.
> >
> > Anyway:
> >
> > 1) It looks like the call to fso.getfile is taking GMasterList as the
file
> > name argument. I don't see the file name declared anywhere, are you sure
> > it's valid?
> >
> > 2) In C, with stream type files, you had to declare the number of bytes
to
> > read, or use a different call to deal with CR delimited records. I'm not
> > sure how your files are laid out. I guess my question is, how does VB
know
> > how much to read before returning? I'm guessing that it's supposed to
read 1
> > "Scripting.FileSystemObject", are you sure that this object accurately
> > reflects the data in the file?
> >
> > Well, those are my only suggestions, and probably worthless. Good luck!
> >
> > Matt
> >
> > -----Original Message-----
> > From: Sidney Fuerte [mailto:fuertsj1104@y...]
> > Sent: Monday, August 26, 2002 5:13 PM
> > To: professional vb
> > Subject: [pro_vb] Program Freeze... Help Urgent!
> >
> > Hi all,
> >
> > what's wrong with this code:
> >
> > Function GetFullName(gAcctNo)
> > Dim fso As New FileSystemObject
> > Dim f As File
> > Dim ts As TextStream
> > Dim sStream As String
> > Dim nPos As Long
> > Set fso = CreateObject("Scripting.FileSystemObject")
> > Set f = fso.GetFile(gMasterList)
> > Set ts = f.OpenAsTextStream(ForReading)
> > sStream = ts.ReadAll
> > nPos = InStr(1, sStream, gAcctNo)
> > If nPos > 0 Then
> > gLastName = Mid(sStream, nPos + 12, 30)
> > gFirstName = Mid(sStream, nPos + 43, 30)
> > gMidName = Mid(sStream, nPos + 74, 30)
> > End If
> > End Function
> >
> > gMasterList is about 1 MB only its not that big, I am trying to do a
> > search on this file, i dont want it line by line co'z it will take long
> > that's why I am reading it all... I debug my program and it freezes from
> > the ts.ReadAll line... any Idea why? do you have any idea to solve my
> > search problem? please help me.
> >
> > Thanks/Regards
> > Sidney
> >
> > ---
> > Visual C# - A Guide for VB6 Developers
> > This book will make it easy to transfer your skills
> > from Visual Basic 6 to C#, the language of choice
> > of the .NET Framework.
> > http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
> >
> >
> > ---
> > Visual C# - A Guide for VB6 Developers
> > This book will make it easy to transfer your skills
> > from Visual Basic 6 to C#, the language of choice
> > of the .NET Framework.
> > http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
> >
> >
> > ---
> > Visual C# - A Guide for VB6 Developers
> > This book will make it easy to transfer your skills
> > from Visual Basic 6 to C#, the language of choice
> > of the .NET Framework.
> > http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
> >
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
>