Results 1 to 7 of 7

Thread: ADO.Net Question

Hybrid View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2002
    Posts
    23

    Question ADO.Net Question

    I am new to database programming, so bare with me. I have created an access database of which there are many tables. Each table will hold records of data captured on a specific date. You see I have these text files created on a daily basis and I want to suck them into a database. I shouldn't have much trouble perging the text files for the data I want to insert, but I do not know how to put certain data in certain fields. Each table is setup as:

    date(txt file was made) | datapoint1 | datapoint2 | datapoint3 | etc...

    One more thing, each text file has information for each one of my 32 tables, so I will have some hoping around to do. At this point, this functionality does not require any graphical intervention, just populating a database.

    Any ideas on where to start? I have already made my connection using VS, not in code.

    Thank you all.

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Are the data of each day basically different? If not y bother with so many tables? I think you may think about redesigning your database.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2002
    Posts
    23
    I can not go into specifics, but lets say each table represents a state, and every day data is gathered from each state for number of cars, buses, trains, planes, etc...

    So I was thinking that I would have a table of dates, and each state would have its own table, filled with records of each dates data. The "dates" table would have a one to one relationship to each corresponding date in each of the tables for the states.

    I do not know much about the relationship thing, so I am open to suggestions.

    I was thinking that as I gathered the bits of data from the text files, I would stick them into an array, then make a record from that array.

    Thank you for your response...

  4. #4
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Still i think you dont need that much table. If the data in different states are of the same kind, for example each state has buses, cares, ...you can have all of them in table linking with parent tables of date and states. It can be done by 3 tables then. To pump data from arrays to tables you may use datarow object.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Aug 2002
    Posts
    23
    How then would you link them? What would the relationships be?

    Thanks again. I really appreciate your help.

  6. #6
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Just a suggestion, look at the attachment. Remember that table cars does not need a primary key, but without that you have to manage to write the update statement yourself as VS wont build it automatically for you. A little hard to start with maybe.
    Attached Files Attached Files
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Aug 2002
    Posts
    23
    Thank you Lunatic3. I will have a look at this tomorrow. I really appreciate your help.

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