N
Niklas Östergren
Good morning!
I´m in that luxury situation that I can format the data which need to be
imported into my application the way I want. I´m developing a db for storing
member data about members in our assosiation. Like names, addresses,
membership types but allso family members names and DoB:s.
Right now I´m having a dialoge with the webmaster of our website because
it´s possible to apply for a membership through our website. The diskussion
right now is exactly how shall the data that I get from this website be
formatted so I can import it into my db?
In my db I have 2 table for this purpose <tblMemberApplyRegistration> and
<tblFamilyMemberRegistration> with a ONE -> MANY relation. These tables is
only used to import the data to and also used in a wizard that I allready
have created with several forms.
The data, from the website, is today sent over with e-mail but my intention
is to ask the webmaster if he can´t send it as a attached textfile so the
user of my application can save the attached textfile in a folder only for
this and then, through my application, selecte the file to be imported (by
using Save/Open Dialoge). The data will then be imported into the two tables
and I start the wizard so the user can select further options.
Now to my problem:
Since I havn´t done this a lot before I´m a little bit unsure which way is
the best to go. I intend to use <DoCmd.TransfereText> to do this, I have
used this before.
The data that I need to import can look like this:
FirstName,LastName,DoB....etc.
Niklas,Östergren,041224
This is if the person applying for membership only for ONE person. But how
shall the data be formatted in the textfield if he applyés for membership
for his whole family? The data needs to go in 2 different tables (to start
with anyway). The "applyer´s" data (Name, DoB, Addreses etc.) in
<tblMemberApplyRegistration> and the family members names, DoB in table
<tblFamilyMemberRegistration>.
If I use acImportDelim or any of the other transfere types for importing
data I don´t know which data in the attached textfile to import into which
table, or?
I know that some of you now are going to mention that the names and DoB´s
needs to go into the same tables no matter if it´s family members on the
"applyer´s" names. In the end it will. What is actually happening in my
application is that I store ALL names, DoB´s in table
<tblFamilyMemberRegistration>, including the "applyer´s". But when the user
step´s on to the next form inmy wizard I copy the data into the real tables
<tblPerson> (Names,DoB) which have a ONE -> MANY relation to
<tblPersonAddress> in which I store the address for all people. And since a
family lives on ONE address (the have to to be able to join as a family
member in our assosiation it has to do with dispatches) I only need to
change the address in one place.
<tblPerson> is also related to <tblFamilyMembers> with a ONE -> MANY
relation. In this table I store primary key for each person whco is a family
member and which data is stored in <tblPerson>. But also primary key for the
membership that each person have (stored in <tblMember>). The family is then
linked together in this table with the main member´s MemberNo, which is the
person that applyed for the membership.
I recon that my db is petty much normalized so no I hope that I have
explaned the information needed to be able to help me out with this problem
of HOW the data shall be formatted for me to be able to import it in the
correct tables?
TIA!
// Niklas
I´m in that luxury situation that I can format the data which need to be
imported into my application the way I want. I´m developing a db for storing
member data about members in our assosiation. Like names, addresses,
membership types but allso family members names and DoB:s.
Right now I´m having a dialoge with the webmaster of our website because
it´s possible to apply for a membership through our website. The diskussion
right now is exactly how shall the data that I get from this website be
formatted so I can import it into my db?
In my db I have 2 table for this purpose <tblMemberApplyRegistration> and
<tblFamilyMemberRegistration> with a ONE -> MANY relation. These tables is
only used to import the data to and also used in a wizard that I allready
have created with several forms.
The data, from the website, is today sent over with e-mail but my intention
is to ask the webmaster if he can´t send it as a attached textfile so the
user of my application can save the attached textfile in a folder only for
this and then, through my application, selecte the file to be imported (by
using Save/Open Dialoge). The data will then be imported into the two tables
and I start the wizard so the user can select further options.
Now to my problem:
Since I havn´t done this a lot before I´m a little bit unsure which way is
the best to go. I intend to use <DoCmd.TransfereText> to do this, I have
used this before.
The data that I need to import can look like this:
FirstName,LastName,DoB....etc.
Niklas,Östergren,041224
This is if the person applying for membership only for ONE person. But how
shall the data be formatted in the textfield if he applyés for membership
for his whole family? The data needs to go in 2 different tables (to start
with anyway). The "applyer´s" data (Name, DoB, Addreses etc.) in
<tblMemberApplyRegistration> and the family members names, DoB in table
<tblFamilyMemberRegistration>.
If I use acImportDelim or any of the other transfere types for importing
data I don´t know which data in the attached textfile to import into which
table, or?
I know that some of you now are going to mention that the names and DoB´s
needs to go into the same tables no matter if it´s family members on the
"applyer´s" names. In the end it will. What is actually happening in my
application is that I store ALL names, DoB´s in table
<tblFamilyMemberRegistration>, including the "applyer´s". But when the user
step´s on to the next form inmy wizard I copy the data into the real tables
<tblPerson> (Names,DoB) which have a ONE -> MANY relation to
<tblPersonAddress> in which I store the address for all people. And since a
family lives on ONE address (the have to to be able to join as a family
member in our assosiation it has to do with dispatches) I only need to
change the address in one place.
<tblPerson> is also related to <tblFamilyMembers> with a ONE -> MANY
relation. In this table I store primary key for each person whco is a family
member and which data is stored in <tblPerson>. But also primary key for the
membership that each person have (stored in <tblMember>). The family is then
linked together in this table with the main member´s MemberNo, which is the
person that applyed for the membership.
I recon that my db is petty much normalized so no I hope that I have
explaned the information needed to be able to help me out with this problem
of HOW the data shall be formatted for me to be able to import it in the
correct tables?
TIA!
// Niklas