Read files without FSO

S

snoopy

Is there a method of doing this without FSO?
I want to process a .txt template using a different method if the server
doesnt have that object

I would prefer to continue reading and using txt files if its at all
possible.

Cheers!
 
R

Ray at

If the server is a Windows server, it's more likely to have that than any
other object, such as one you create yourself. What do you have against the
FSO? ADO can "read" text files, such as CSV files and what not. You can
also shell out and manipulate text files with shell scripts. But, the FSO
is make to "process" text files, and is the best tool to use in ASP.

Ray at home
 
B

Bullschmidt

Well to manually import data from a CSV file into a database such as
Access you could get into the database, import the file into a new
table, and then run an append query.

If everything is online then let the CSV file be a recordset that you go
through record by record to read and let the regular database table be a
recordset to go through record by record to write. You could delete all
the related records in the regular database first and then add them all
back one by one.

Able Consulting - ADO Connection String Samples
http://www.able-consulting.com/ADO_Conn.htm

Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 
A

Aaron Bertrand [MVP]

Not really. As others have mentioned, you might be able to use a database
connection for CSV, provided your text files are actually CSV files.
Otherwise, there really isn't a good substitute for FSO, unless you store
the "text" in a database instead. (Generally, this will give better
performance, depending on the quantity of data and what kinds of access you
have - read, write, change?)

By the way, why do you think a server wouldn't have FSO?
 
S

snoopy

Ive left one host previously as theyve refused to enable FSO for security
reasons.
Id showed them various responses from these groups as to how permissions
could be managed but they refused to budge.
I just want to be prepared in case I get another host like that.
I figure its easier to rewrite the one FSO function thats used in 30 odd
pages than to have to recode 30 pages :)
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top