Results 1 to 3 of 3

Thread: Reading from Files

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    New Jersey
    Posts
    1

    Exclamation Reading from Files

    I would like to know how to read a specific piece of data off of a CSV file. I know how to read the entire file, and also write it to a new file, but my problem is this... I am using a CSV file, that has specific data in it, that refers to information on my database. For example... UserNAme, UserID, Address, etc.
    I would like to know how to only obtain the username field from the CSV file, then use that information to update other tables in the database, depending on the name I get back. PLEASE HELP. IT's Kind of Urgent. My email address is [email protected]. Any help would be greatly appreciated
    From the jiggaman

  2. #2
    DerFarm
    Guest
    you can attach the CSV file as a file to the Access2000 database.
    Once it is properly set up, you can hit it as you would any other
    read-only table.

    HTH

  3. #3
    jim mcnamara
    Guest
    Assuming that there are no embedded commas in the data
    like: 13,13,"Smith, John",13

    This works just fine
    Code:
    Dim a() as string
    dim comma as string
    Comma = ","
    str   ' a line from the csv file that you want to put into fields
    UserName = 5  ' assume the username is in field 5
    a = Split(str, comma)
    strUserName = a(UserName)

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