Save data from text file into access

G

Guest

Hi: I have 100's of records in my microsoft inbox which i saved into a text
file. I need help how to i import all of them into access table through ASP.
I try it but my script only read the first line of the text file.


Dim fso, fil, ts, sContents
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set fil = fso.getfile(server.mappath("myemails.txt"))
Set ts = fil.openastextstream(1)
sContents = ts.readall
aBuild = Split(sContents, "From:", 2)
sFrom = Split(aBuild(1), vbCrLf, 2)(0)
response.write(sFrom)
next
ts.close
Set ts = nothing
Set fil = nothing
Set fso = nothing
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top