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'
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).