C++, VB, Java, or VBA code for reading GedCom and convertin
Moderator: MOD_nyhetsgrupper
C++, VB, Java, or VBA code for reading GedCom and convertin
Problem is that a single GedCom file seems to represent at least three
different tables: individuals, families, and submitter. I think the first
section on general information about the GedCom would probably be a fourth
table. So it seems like I'd have to create four different comma-delimited
text files.
I'd like to import a GedCom into an Access database then create custom
reports or web pages with the results.
So I guess I would join the familyID field in the family table with the
familyID field in the individual table, etc.
I'm assuming I would begin by looking for the first character of a line
being '0' to indicate a new record, then read characters 3-6 to determine
the kind of record it is (i.e. what table it belongs to), and continue
processing until arriving at the next line beginning with the character '0'
(next record), etc.
Any ideas?
different tables: individuals, families, and submitter. I think the first
section on general information about the GedCom would probably be a fourth
table. So it seems like I'd have to create four different comma-delimited
text files.
I'd like to import a GedCom into an Access database then create custom
reports or web pages with the results.
So I guess I would join the familyID field in the family table with the
familyID field in the individual table, etc.
I'm assuming I would begin by looking for the first character of a line
being '0' to indicate a new record, then read characters 3-6 to determine
the kind of record it is (i.e. what table it belongs to), and continue
processing until arriving at the next line beginning with the character '0'
(next record), etc.
Any ideas?
Re: C++, VB, Java, or VBA code for reading GedCom and conve
Doug McDonald wrote:

=Good= find.
A 'keeper' for future 'ref'.
Raises the <?> ...
will Legacy 'open' a renamed Access DB of =similar= structure ???
Ed
That's easy. Really easy!
Install the free edition of Legacy on your computer.
Import the Gedcom to it, then save it in the
Legacy sbtandard .fdb file.
Then open this file with Access. You have to tell Access to
look for .fdb files.
Finally root around in the various tables to see what the
database structure looks like. It's all there.
Doug McDonald

=Good= find.
A 'keeper' for future 'ref'.
Raises the <?> ...
will Legacy 'open' a renamed Access DB of =similar= structure ???
Ed
Re: C++, VB, Java, or VBA code for reading GedCom and conve
On Fri, 05 Nov 2004 19:34:46 GMT, "Richard Hollenbeck"
<[email protected]> wrote:
There are some perl modules available for manipulating gedcom's at...
http://search.cpan.org/dist/Gedcom/
I looked at these and used their logic as a basis for writing my own C++
classes. You might want to do something similar.
Dennis
<[email protected]> wrote:
Problem is that a single GedCom file seems to represent at least three
different tables: individuals, families, and submitter. I think the first
section on general information about the GedCom would probably be a fourth
table. So it seems like I'd have to create four different comma-delimited
text files.
I'd like to import a GedCom into an Access database then create custom
reports or web pages with the results.
So I guess I would join the familyID field in the family table with the
familyID field in the individual table, etc.
I'm assuming I would begin by looking for the first character of a line
being '0' to indicate a new record, then read characters 3-6 to determine
the kind of record it is (i.e. what table it belongs to), and continue
processing until arriving at the next line beginning with the character '0'
(next record), etc.
Any ideas?
There are some perl modules available for manipulating gedcom's at...
http://search.cpan.org/dist/Gedcom/
I looked at these and used their logic as a basis for writing my own C++
classes. You might want to do something similar.
Dennis
Re: C++, VB, Java, or VBA code for reading GedCom and conve
Richard Hollenbeck wrote:
That's easy. Really easy!
Install the free edition of Legacy on your computer.
Import the Gedcom to it, then save it in the
Legacy sbtandard .fdb file.
Then open this file with Access. You have to tell Access to
look for .fdb files.
Finally root around in the various tables to see what the
database structure looks like. It's all there.
Doug McDonald
Problem is that a single GedCom file seems to represent at least three
different tables: individuals, families, and submitter. I think the first
section on general information about the GedCom would probably be a fourth
table. So it seems like I'd have to create four different comma-delimited
text files.
I'd like to import a GedCom into an Access database then create custom
reports or web pages with the results.
That's easy. Really easy!
Install the free edition of Legacy on your computer.
Import the Gedcom to it, then save it in the
Legacy sbtandard .fdb file.
Then open this file with Access. You have to tell Access to
look for .fdb files.
Finally root around in the various tables to see what the
database structure looks like. It's all there.
Doug McDonald
:-) Re: C++, VB, Java, or VBA code for reading GedCom and c
Charlie wrote:
Hello "Chas",
As a 'dino', I dont shock, so easy, any more.

.....................
'Long' story =short=
M$ Access 'buries' lotsa "goodie" in it's DB structures ...
among "them" ...
IE : an internal "DB" file_type identifier to distinguish .mdb "files"
from .mde "files" ...
"mdb" are 'out_in_the_open"( not encrypted ), & not compressed ...
"mde" are encrypted ......................., & compressed.
"mdb" allow 'user_access" to the design detail,
"mde" ==> =NOT=
Theres 'more' , but that aughta suffice for an example.
'mde' "files" can be re_named as 'mdb' ,
and will function properly ...
but,
prevent a user from look&peep ... tinkering.
Somewhere, I have a code routine to internally discern mdb from mde.
If I dont look for 'it' ... mite find it.
If I 'do' ... I wont.
I have un_fettered access to "all" on my PC ,
I just have trouble locating a single thing, out of 'all'.
=Legacy= ...
Not at all familiar ... nada/zip/zero.
"SGC" comments =suggest= it ?mite? be based on/in M$ Access.
??????????
Since its a propritary 'app',
I'd have expected an "mde" file ,
as opposed to an "mdb" ...
Be mucho interesting if "some" "SGC_er" had the wherewithall to play ...
tinker.
<VBG>
Aughta be fully legal, altho ya mite get a 'raised' eyebrow from ???
..............................
My fish_fryer is too full ,
I cant "fry" what I got on-hand ...
let alone another 'fish'.
<drowning sounds>
Ed
Raises the <?> ...
will Legacy 'open' a renamed Access DB of =similar= structure ???
Ed
It would really shock me if it wouldn't. I mean, how would it "know"
if Legacy had created the file, or if you created it yourself?
Hello "Chas",
As a 'dino', I dont shock, so easy, any more.

.....................
'Long' story =short=
M$ Access 'buries' lotsa "goodie" in it's DB structures ...
among "them" ...
IE : an internal "DB" file_type identifier to distinguish .mdb "files"
from .mde "files" ...
"mdb" are 'out_in_the_open"( not encrypted ), & not compressed ...
"mde" are encrypted ......................., & compressed.
"mdb" allow 'user_access" to the design detail,
"mde" ==> =NOT=
Theres 'more' , but that aughta suffice for an example.
'mde' "files" can be re_named as 'mdb' ,
and will function properly ...
but,
prevent a user from look&peep ... tinkering.
Somewhere, I have a code routine to internally discern mdb from mde.
If I dont look for 'it' ... mite find it.
If I 'do' ... I wont.
I have un_fettered access to "all" on my PC ,
I just have trouble locating a single thing, out of 'all'.
=Legacy= ...
Not at all familiar ... nada/zip/zero.
"SGC" comments =suggest= it ?mite? be based on/in M$ Access.
??????????
Since its a propritary 'app',
I'd have expected an "mde" file ,
as opposed to an "mdb" ...
Be mucho interesting if "some" "SGC_er" had the wherewithall to play ...
tinker.
<VBG>
Aughta be fully legal, altho ya mite get a 'raised' eyebrow from ???
..............................
My fish_fryer is too full ,
I cant "fry" what I got on-hand ...
let alone another 'fish'.
<drowning sounds>
Ed
Re: :-) Re: C++, VB, Java, or VBA code for reading GedCom a
Doug McDonald wrote:
Another 'good to know' ... thanks.
Ed.
Legacy is based on FoxPro, thus the .fdb file.
Microsoft bought FoxPro, so they made Access read its files.
Another 'good to know' ... thanks.
Ed.
Re: C++, VB, Java, or VBA code for reading GedCom and conve
On Thu, 04 Nov 2004 20:49:58 -0400, 0_Qed <[email protected]>
wrote:
It would really shock me if it wouldn't. I mean, how would it "know"
if Legacy had created the file, or if you created it yourself?
---
Charlie Hoffpauir
http://freepages.genealogy.rootsweb.com/~charlieh/
wrote:
Doug McDonald wrote:
That's easy. Really easy!
Install the free edition of Legacy on your computer.
Import the Gedcom to it, then save it in the
Legacy sbtandard .fdb file.
Then open this file with Access. You have to tell Access to
look for .fdb files.
Finally root around in the various tables to see what the
database structure looks like. It's all there.
Doug McDonald
=Good= find.
A 'keeper' for future 'ref'.
Raises the <?> ...
will Legacy 'open' a renamed Access DB of =similar= structure ???
Ed
It would really shock me if it wouldn't. I mean, how would it "know"
if Legacy had created the file, or if you created it yourself?
---
Charlie Hoffpauir
http://freepages.genealogy.rootsweb.com/~charlieh/
Re: C++, VB, Java, or VBA code for reading GedCom and conve
Le Fri, 05 Nov 2004 19:34:46 GMT, "Richard Hollenbeck"
<[email protected]> a écrit :
and sources.
You can use LifeLines http://lifelines.sourceforge.net
LifeLines provides a scripting language.
An exemple for a marriage list :
========= listmar.ll ======
global(fami)
global(nbrf)
proc main() {
dayformat(1)
monthformat(1)
"date;date;place;husb;wife;fath husb;moth husb;fath wife;moth wife\n"
forfam(fami, nbrf) {
if(e, marriage(fami)) {
set(husb, husband(fami))
set(wif, wife(fami))
dateformat(11) /* AAAAMMJJ */
stddate(e) ";"
dateformat(3) /*JJ/MM/AAAA */
stddate(e) ";"
place(e) ";"
if (husb) {
name(husb)
set(pindiv, father(husb))
set(mindiv, mother(husb))
}
";"
if (wif) {
name(wif)
set(pspouse, father(wif))
set(fspouse, mother(wif))
}
";"
if (pindiv) {name(pindiv)} ";"
if (mindiv) {name(mindiv)} ";"
if (pspouse) {name(pspouse)} ";"
if (pspouse) {name(fspouse)} ";"
nl()
}
}
}
--
Patrick Texier
<[email protected]> a écrit :
Problem is that a single GedCom file seems to represent at least three
different tables: individuals, families, and submitter.
and sources.
I think the first
section on general information about the GedCom would probably be a fourth
table. So it seems like I'd have to create four different comma-delimited
text files.
You can use LifeLines http://lifelines.sourceforge.net
LifeLines provides a scripting language.
An exemple for a marriage list :
========= listmar.ll ======
global(fami)
global(nbrf)
proc main() {
dayformat(1)
monthformat(1)
"date;date;place;husb;wife;fath husb;moth husb;fath wife;moth wife\n"
forfam(fami, nbrf) {
if(e, marriage(fami)) {
set(husb, husband(fami))
set(wif, wife(fami))
dateformat(11) /* AAAAMMJJ */
stddate(e) ";"
dateformat(3) /*JJ/MM/AAAA */
stddate(e) ";"
place(e) ";"
if (husb) {
name(husb)
set(pindiv, father(husb))
set(mindiv, mother(husb))
}
";"
if (wif) {
name(wif)
set(pspouse, father(wif))
set(fspouse, mother(wif))
}
";"
if (pindiv) {name(pindiv)} ";"
if (mindiv) {name(mindiv)} ";"
if (pspouse) {name(pspouse)} ";"
if (pspouse) {name(fspouse)} ";"
nl()
}
}
}
--
Patrick Texier
Re: :-) Re: C++, VB, Java, or VBA code for reading GedCom a
0_Qed wrote:
Legacy is based on FoxPro, thus the .fdb file.
Microsoft bought FoxPro, so they made Access read its files.
Doug McDonald
=Legacy= ...
Not at all familiar ... nada/zip/zero.
"SGC" comments =suggest= it ?mite? be based on/in M$ Access.
??????????
Legacy is based on FoxPro, thus the .fdb file.
Microsoft bought FoxPro, so they made Access read its files.
Doug McDonald
Re: :-) Re: C++, VB, Java, or VBA code for reading GedCom a
Doug McDonald wrote:
Dunno that parentage matters here! But Access opens the files without
problems (as it does for GenBox), and this allows the user to write
their own reports. My pet peeve with genie programs is the stunted
approach to report writing they all seem to have. Automation can be
good, but often you need to be individually creative, and the Access
query and report writers come in handy here.
Paul Blair
Canberra, Australia
0_Qed wrote:
=Legacy= ...
Not at all familiar ... nada/zip/zero.
"SGC" comments =suggest= it ?mite? be based on/in M$ Access. ??????????
Legacy is based on FoxPro, thus the .fdb file.
Microsoft bought FoxPro, so they made Access read its files.
Doug McDonald
Dunno that parentage matters here! But Access opens the files without
problems (as it does for GenBox), and this allows the user to write
their own reports. My pet peeve with genie programs is the stunted
approach to report writing they all seem to have. Automation can be
good, but often you need to be individually creative, and the Access
query and report writers come in handy here.
Paul Blair
Canberra, Australia
Re: :-) Re: C++, VB, Java, or VBA code for reading GedCom a
Paul Blair wrote:
I haven't been able to open a Legacy.fdb file with the software under
discussion, Access & Genbox, and am looking for clues. Genbox 3.3.0 gives the
message: "Operation Failed - This file is not a Genbox database". The MS
Access 97 on my system may be too old, but I haven't found a way to open a
Legacy.fdb file with it. Cockpit problems or ?
Bob
Doug McDonald wrote:
Legacy is based on FoxPro, thus the .fdb file.
Microsoft bought FoxPro, so they made Access read its files.
Doug McDonald
Dunno that parentage matters here! But Access opens the files without
problems (as it does for GenBox), and this allows the user to write
their own reports. My pet peeve with genie programs is the stunted
approach to report writing they all seem to have. Automation can be
good, but often you need to be individually creative, and the Access
query and report writers come in handy here.
I haven't been able to open a Legacy.fdb file with the software under
discussion, Access & Genbox, and am looking for clues. Genbox 3.3.0 gives the
message: "Operation Failed - This file is not a Genbox database". The MS
Access 97 on my system may be too old, but I haven't found a way to open a
Legacy.fdb file with it. Cockpit problems or ?

Bob
Re: :-) Re: C++, VB, Java, or VBA code for reading GedCom a
On Sat, 06 Nov 2004 20:28:33 -0600, Doug McDonald
<mcdonald@SnPoAM_scs.uiuc.edu> declaimed the following in
soc.genealogy.computing:
stores /each/ table as a set of files: dbf for main fixed width record
table, fpt for varying length text, and cdx for combined indices.
FoxPro files need to be imported via an ODBC connection for use
in Access.
The Legacy "fdb" behaves just like an Access/JET mdb file -- all
data stored in a single file. Or, I should grant, it did the last time
/I/ tried such -- a few years ago.
--
<mcdonald@SnPoAM_scs.uiuc.edu> declaimed the following in
soc.genealogy.computing:
Legacy is based on FoxPro, thus the .fdb file.
Microsoft bought FoxPro, so they made Access read its files.
So far as I know, FoxPro uses "dbf" as the extension. FoxPro
stores /each/ table as a set of files: dbf for main fixed width record
table, fpt for varying length text, and cdx for combined indices.
FoxPro files need to be imported via an ODBC connection for use
in Access.
The Legacy "fdb" behaves just like an Access/JET mdb file -- all
data stored in a single file. Or, I should grant, it did the last time
/I/ tried such -- a few years ago.
--
==============================================================
[email protected] | Wulfraed Dennis Lee Bieber KD6MOG
[email protected] | Bestiaria Support Staff
==============================================================
Home Page: <http://www.dm.net/~wulfraed/
Overflow Page: <http://wlfraed.home.netcom.com/