Results 1 to 2 of 2

Thread: selecting a data based on condition in vb6.0 from text file

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2008
    Posts
    73

    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'

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    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
  •  



Click Here to Expand Forum to Full Width