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