|
-
Sep 13th, 2000, 09:19 AM
#1
Thread Starter
Fanatic Member
-
Sep 13th, 2000, 09:27 AM
#2
_______
<?>
give an example of your file please:
Not the whole of it but 4 or 5 lines
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 13th, 2000, 09:31 AM
#3
Hyperactive Member
Here's a good tip on the string parsing part
http://www.vbsquare.com/tips/tip391.html
As far as searching through the file, you could use the following code if your search criteria is equal to one line in the text file:
Code:
Dim fileName As String
Dim Text As String
Dim NewString As String
fileName = 'put the file access route here
Open fileName For Input As #1
Do While Not EOF(1)
Line Input #1, Text
If Text = myComparison Then 'look to see if the text equals the comparison
NewString = ParseString(Text, ";", 2)
Exit Do
End If
Loop
And yes, like HeSaidJoe requests, it will be helpful if you can post a few lines of the file and an example of what you might want to search for in the file.
-
Sep 13th, 2000, 09:34 AM
#4
_______
<?>
that is one way..you could also just read it into an array and do your stuff...I think it depends on the information in the file and what you want to extract as to how it should be done. ex. are the Colons in the file? Is it a delimited file? etc.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 14th, 2000, 01:14 PM
#5
Thread Starter
Fanatic Member
Yes you are right. My file is semi colon delimited file. I want to search the line containing certain number and when the number is found, separate out all different strings from the line and display them in text boxes.
My file looks somewhat liek this:
"1111";"ABCD";"Axzceydegwe1243";"hdsdgsadhvbd"
"2222";"xzyx";"fkdffvjhdsfgsdfsdhdfdfdegwe";"jfdgfnbmvc"
"3333";"pdskdhsfds";"fdsfduytuthdfdfdegwe";"weresadfnbmvc"
Thanks
Kinjal 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|