|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
Quote:
I would like actual coded example if possible please. Thank you very much |
|
#4
|
|||
|
|||
|
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 |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > How to read 1st Variable line by line from a .txt file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|