|
-
Feb 9th, 2010, 02:59 AM
#1
Thread Starter
Lively Member
selecting a data based on condition in vb6.0 from text file
i have a sample.txt file with data as
29,ERING,,12,14,oval,2,,,,,,,,,,,,,,,,,,,,,,,,,,
30,RING_A,,10,11,round,1,2,100,45,good,,,,,,,,,,,,,,,,,,,,,,
30,RING_A,,12,14,oval,2,5,42,70,ok,,,,,,,,,,,,,,,,,,,,,,
i am uisng
select * from sample.txt
i get all the data
but i want it to be conditional hwo do i write teh condition
as per this text file i need to check the second column ie RING_A,ERING
how do i check it in select sattement
select * from sample.txt where column(1)=' RING_A'
-
Feb 9th, 2010, 08:04 AM
#2
Re: selecting a data based on condition in vb6.0 from text file
To save yourself time and aggravations convert your file to small database - MS Access or perhaps MS SQL Express.
Otherwise read file line-by-line and check if "your text" is in the current line (instr function will do it).
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
|