Reading File lines

G

Guest

Hello all,

I have a question about reading text files in Access97. I have to parse a
file to obtain the values for the database. I have some (very) minor ability
in VB programming, but I'm still learning the differences between VB and VBA.

Now I'm aware of the Line Input code (Line Input #file, string), but I was
wondering if there's a way to use FileSystemObject and TextStream? I'm using
Access 97, so I'm not sure if I can do that.

Also, does VBA have a version? Like, A97 uses VB6, and A03 uses VB.Net? I
could be completely off in that assumption, but I thought I'd ask.

The whole goal of this is to read a line, remove all the junk from each
line, then input the values into a table. It seemed FSO and Streams would be
easier to operate. I could be wrong, as I'm not very familiar with the line
inputs.

Any help is appreciated.

Thanks,
Jay
 
M

Marshall Barton

Jay said:
I have a question about reading text files in Access97. I have to parse a
file to obtain the values for the database. I have some (very) minor ability
in VB programming, but I'm still learning the differences between VB and VBA.

Now I'm aware of the Line Input code (Line Input #file, string), but I was
wondering if there's a way to use FileSystemObject and TextStream? I'm using
Access 97, so I'm not sure if I can do that.

Also, does VBA have a version? Like, A97 uses VB6, and A03 uses VB.Net? I
could be completely off in that assumption, but I thought I'd ask.

The whole goal of this is to read a line, remove all the junk from each
line, then input the values into a table. It seemed FSO and Streams would be
easier to operate. I could be wrong, as I'm not very familiar with the line
inputs.


I have always used Line Input for this kind of thing, if for
no other reason than it avoids referencing another library.
What the hey, it's a good oportunity to become more familiar
with VBA (which is VB6 from A97 through A2003 and beyond).

If you're up for it, here's a VBA class module that will
take care of a lot of the nitty-gritty stuff for you:
http://www.mvps.org/access/modules/mdl0057.htm
 
D

David Lloyd

Jay:

Regarding the FileSystemObject and the TextStream class, the following KB
articles may be a good reference, depending on your exact needs.

http://support.microsoft.com/kb/186118/EN-US/
http://support.microsoft.com/default.aspx?scid=kb;en-us;189751


--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


Hello all,

I have a question about reading text files in Access97. I have to parse a
file to obtain the values for the database. I have some (very) minor
ability
in VB programming, but I'm still learning the differences between VB and
VBA.

Now I'm aware of the Line Input code (Line Input #file, string), but I was
wondering if there's a way to use FileSystemObject and TextStream? I'm
using
Access 97, so I'm not sure if I can do that.

Also, does VBA have a version? Like, A97 uses VB6, and A03 uses VB.Net? I
could be completely off in that assumption, but I thought I'd ask.

The whole goal of this is to read a line, remove all the junk from each
line, then input the values into a table. It seemed FSO and Streams would
be
easier to operate. I could be wrong, as I'm not very familiar with the line
inputs.

Any help is appreciated.

Thanks,
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top