Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > simple question


Reply
 
Thread Tools Display Modes
  #1  
Old 03-04-2003, 12:53 PM
jlbryant jlbryant is offline
Contributor
 
Join Date: Jan 2003
Posts: 650
Default simple question


i am using this code to delete some lines from a text file

Open "C:\windows\system\personnel.txt" For Input As #1
Open "C:\windows\system\personnel1.txt" For Append As #2
Do While Not EOF(1)
Input #1, LineStr
Line = Line + 1
If (Line <> 1) Then

Print #2, LineStr
Else
'Ignore the line
End If

Loop

Close #2
Close #1

Kill "c:\windows\system\personnel.txt"
Name "C:\windows\system\personnel1.txt" As "C:\windows\system\personnel.txt"

my problem is when i originaly write the lines to the text file it puts them in like this

"a",#TRUE#
"b",#TRUE#
so on

well the above code deletes the first part like "a" but it won't delete #TRUE#.
whats going on?
Reply With Quote
  #2  
Old 03-04-2003, 01:01 PM
Konrad Rudolph Konrad Rudolph is offline
Freshman
 
Join Date: Jan 2003
Posts: 46
Default

use Line Input instead of Input!
__________________
_
"Violence is the last refuge of the incompetent" - Isaac Asimov
Reply With Quote
  #3  
Old 03-04-2003, 03:56 PM
rbulph rbulph is offline
Junior Contributor
 
Join Date: Dec 2002
Posts: 401
Default

Konrad,

C'est expres que tu as mal ecrit "incompetent"?

rbulph
Reply With Quote
  #4  
Old 03-04-2003, 04:03 PM
Konrad Rudolph Konrad Rudolph is offline
Freshman
 
Join Date: Jan 2003
Posts: 46
Default

Quote:
Originally Posted by rbulph
C'est expres que tu as mal ecrit "incompetent"?
non, mais merci pour la remarque
__________________
_
"Violence is the last refuge of the incompetent" - Isaac Asimov
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple ADO/sql question seidenstud Database and Reporting 5 12-06-2002 03:01 PM
beginner: simple question... simonsays Miscellaneous Languages 6 11-23-2002 08:09 AM
Very simple query question ishikawams Database and Reporting 9 11-12-2002 01:54 PM
A Simple Question...... SolarCoasters General 5 11-07-2002 03:04 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->