SunQuest
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old July 30th, 2003, 07:52 AM
jharber15 jharber15 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 41 jharber15 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
removing characters from txt file or during/before export

I was wondering if there is way to remove characters from a txt file using vb code.

For example,

"data1", "data2", "data3"

I need

data1data2data3

That is my data. I want to remove the commas and quotes.

I am doing an export of an access database. By default, it is coming out with thse quotes and commas. Let me know if there is any way to fix this! Thanks guys.

Reply With Quote
  #2  
Old July 30th, 2003, 08:25 AM
raschma raschma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Overland Park, KS
Posts: 3 raschma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
There are two statements you can use to write information to a file: Write# and Print#.

Write# automatically includes comma/quote delimits. Print# outputs only the exact values you tell it to output.

To use your example:

txtField1 = "text1"
txtField2 = "text2"
txtField3 = "text3"

Write #1, txtField1, txtField2, txtField3

would result in a file with:
"text1","text2","text3"

Replace the Write# with Print# as follows:
Print #1, txtField1 ; txtField2 ; txtField3

would result in a file with:
text1text2text3

Reply With Quote
  #3  
Old July 30th, 2003, 10:37 AM
jharber15 jharber15 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 41 jharber15 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
That worked perfectly! Thanks so much!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > removing characters from txt file or during/before export


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway