473,327 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

TextStream Object Write to File Fails When Field Text Contains Returns

I'm having a problem using a TextSteam object to write to file:

The following produces an error when the Access field I am writing from
contains a return character:

a.Write strText

It appears as if the call to Write sees the return as the end of the
argument (thus it appears to be missing the closing quote marks).

I'm sure the solution is simple, but how can I get around this?

Thanks!

Feb 1 '06 #1
1 2648

<mo*****@hotmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I'm having a problem using a TextSteam object to write to file:

The following produces an error when the Access field I am writing from
contains a return character:

a.Write strText

It appears as if the call to Write sees the return as the end of the
argument (thus it appears to be missing the closing quote marks).

I'm sure the solution is simple, but how can I get around this?


I'm puzzled why anyone thinks it is a Good Idea to use the FileSystemObject
(which requires the Windows Scripting Host that is often disabled by System
Administrators because of security considerations) to perform actions that
are done perfectly well by the built-in File I/O commands.

Look in Help for the Open, Close, and Print # statements.

Larry Linson
Microsoft Access MVP
Feb 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't...
3
by: risa | last post by:
I tried to read a text file using the Textstream object and each file line has 4 elements. How do I put them in 4 separate table cells? Thand you very much in advance. Risa
6
by: Andy | last post by:
hI, wOULD PLEASE HELP ME. I AM GETTIGN THE REQUEST OBJECT ERROS ASP 0105: 80004005 INDEX OUT OF RANGE ERROR. HERE IS THE SNIPPET OF CODE THAT I AM USING. WHAT IS WRONG HERE? YOU CAN SEE WHAT I AM...
6
by: Christian Blackburn | last post by:
Hi Gang, I have so far been unable to get the TextStream Object to write on Fat32. I'm using Windows 2000 Pro Sp4. Scripts have write access and I even tried giving IUSR user level writes and...
7
by: Pablo J Royo | last post by:
Hello: i have a function that reads a file as an argument and returns a reference to an object that contains some information obtained from the file: FData &ReadFile(string FilePath); But ,...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
12
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press...
1
by: AspProgrammer | last post by:
Hello I'm writing a web application where i upload a file. then i open the file use textstream. At the end of my application i close it by using TextStream.close. But when i try to delete the...
4
by: Antonio Tirado | last post by:
Hi, I'm using the OleDB namespace to open a CSV File. I can read the file sucessfully except for hyphenated values. My CSV File contains phone numbers and sometimes these come separated with...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.