Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual 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 ASP Free Forums Sponsor:
  #1  
Old December 20th, 2004, 11:58 PM
Mendes Mendes is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 2 Mendes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to read 1st Variable line by line from a .txt file

1st question. Is it easier if I use a database I assume?

Say for example I have a file named test.txt which looks like this

"Test1"
"Tst2"
"tt3"

And I do a search for "Tst2" how would I go through file to find that?

Open test.txt for input #1
white not EOF(1)

????

I am totally lost here. And are there any thorough tutorials online for visual basic 6 or a GOOD quality book that would touch on things like this an DBGrid's? The only one I have is too basic.

Thanks in advance and I apologize for the question but I can't find a resolution anywhere.

Reply With Quote
  #2  
Old December 21st, 2004, 07:13 AM
satishkumarj satishkumarj is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 109 satishkumarj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 1 h 37 m
Reputation Power: 4
Hi,

We have 2 ways to read the text file , we can read line by line or ,

we can read whole txt file at time, after that we can search for the search string using InStr function

actually what u need here , u want code or approach please let me know,

Regards,
Satish Kumar J.

Reply With Quote
  #3  
Old December 21st, 2004, 10:02 AM
Mendes Mendes is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 2 Mendes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by satishkumarj
Hi,

We have 2 ways to read the text file , we can read line by line or ,

we can read whole txt file at time, after that we can search for the search string using InStr function

actually what u need here , u want code or approach please let me know,

Regards,
Satish Kumar J.


I would like actual coded example if possible please. Thank you very much

Reply With Quote
  #4  
Old December 21st, 2004, 10:10 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 22 h 23 m 39 sec
Reputation Power: 181
You could start with the VB6 documentation

http://msdn.microsoft.com/library/en-us/vbcon98/html/vbconFolderFileProcessing.asp
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > How to read 1st Variable line by line from a .txt file


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 6 hosted by Hostway
Stay green...Green IT