If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > text File

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-30-03, 10:55
crown100 crown100 is offline
Registered User
 
Join Date: Sep 2003
Posts: 2
text File

How do I write to a text file with no carriage returns??
I have Tried :

Replace("fieldname", vbCRLf,"")
Replace("fieldname",char(13) & char(10),"")


Both of them don't work
Reply With Quote
  #2 (permalink)  
Old 09-30-03, 12:28
rhs98 rhs98 is offline
Super Moderator
 
Join Date: Feb 2002
Location: Hampshire, UK
Posts: 441
remove the quotes from around fieldname
Reply With Quote
  #3 (permalink)  
Old 09-30-03, 12:38
crown100 crown100 is offline
Registered User
 
Join Date: Sep 2003
Posts: 2
Quote:
Originally posted by rhs98
remove the quotes from around fieldname
I tried that and it did not work

Here is the code:

Private Sub Command41_Click()
Open "c:\text.txt" For Append As #1



Write #1, Replace(Me.UCC, vbCrLf, "")




Close #1
End Sub
Reply With Quote
  #4 (permalink)  
Old 10-02-03, 01:56
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Don't know if this hopefully might help somehow:

FileSystemObject
http://www.4guysfromrolla.com/webtec...leSystemObject

The Wonders of the File System Object by Chris Payne - 8/16/2000
http://www.15seconds.com/Issue/000816.htm
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On