Results 1 to 3 of 3

Thread: [RESOLVED] How should I handle this(csvReader)

  1. #1

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Resolved [RESOLVED] How should I handle this(csvReader)

    Hi Guys,

    I have a csv file. I use a CSVReader to get data of the file.

    in the first column I have an order number. this is the process:

    1. Use the order number and make an Entry into an Category table.
    2. Get the last insert if and store in a variable
    3. Loop through the csv file and check where the order number equals the current order number and then create items in an item table using the last insert id as a foreign key.

    How should I do this. Should I use another csv reader to handle the item creating. please help

  2. #2
    New Member
    Join Date
    Jul 2008
    Posts
    2

    Re: How should I handle this(csvReader)

    Is this (http://www.koders.com/java/fid24AE9F...EA2B4F702.aspx) the CSVReader you talk of? If you want to wirte to CSV then you could use CSVWriter (http://www.koders.com/java/fid0734BC...E2E18223.aspx).

    To add a row to a CSV you should add it to the end of the CSV string with a column separating each row and with strings in quotes:

    1,2,3,4,5,"hello"

  3. #3

    Thread Starter
    PowerPoster Nitesh's Avatar
    Join Date
    Mar 2007
    Location
    Death Valley
    Posts
    2,556

    Re: How should I handle this(csvReader)

    Ain't exactly what I need, but some great information I can use for the future. Thanks alot. I have solved my problem

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