Re: Database Structure Question ... Serious Help Only Pls
- From: pietlinden@xxxxxxxxxxx
- Date: 28 Aug 2006 15:03:14 -0700
Maybe simply appending with a query won't work... (I'm open to other
suggestions!)
The only problem you might have is determining the primary key
information so that you know where to write each record's data. (Well,
so you can relate the data back to a single parent record after
splitting up your Excel data.) I found this in one of Steve Arbaugh's
old posts:
<SNIP>
On your recordset object after you have updated the recordset issue a
command such as:
MyRecordset.Move 0, MyRecordset.LastModified
and then just read the value of the field.
HTH
Steve Arbaugh
ATTAC Consulting Group
</SNIP>
So you could open a static recordset of the Excel data, loop through
it, and append the parent table data, grab the PK as above and store it
in a variable in your code. Then you could do the appends to all the
child tables and pass that same value as the foreign key. Might look
ugly in code, but it's a lot faster than doing the whole thing
manually. Essentially, you would be adding each normalized record to
one or more tables (Parent table first), and then adding the children
and the Parent table's primary key to the child tables. Everything
would turn out nice and normalized, and once you got the code working,
you could run it and forget about it.
Pieter
.
- References:
- Database Structure Question ... Serious Help Only Pls
- From: DrewKull
- Re: Database Structure Question ... Serious Help Only Pls
- From: Tim Marshall
- Re: Database Structure Question ... Serious Help Only Pls
- From: DrewKull@xxxxxxxxx
- Re: Database Structure Question ... Serious Help Only Pls
- From: pietlinden
- Re: Database Structure Question ... Serious Help Only Pls
- From: DrewKull@xxxxxxxxx
- Database Structure Question ... Serious Help Only Pls
- Prev by Date: Re: three field conditional HELP!
- Next by Date: Re: Database Structure Question ... Serious Help Only Pls
- Previous by thread: Re: Database Structure Question ... Serious Help Only Pls
- Next by thread: Re: Database Structure Question ... Serious Help Only Pls
- Index(es):
Relevant Pages
|