View Full Version : Extract data from compiled 4D database?


rumplestiltskin
01-23-2005, 02:15 AM
A client has an old (v2.x Runtime for Mac) 4D database whose structure
file is, unfortunately, compiled. The original developer no longer has
the uncompiled version (lost in some move evidently). We'd like to
revise the DB (actually, re-create it in 4D for OSX) but it would
appear that we'd have to extract the data somehow into tab-delimited
text for re-importation through the new structure.

So there's the problem: How do I extract the data from the ".data" file
into the five or six "tables" of data I know we really have (based upon
what I see being related when we actually use the compiled app)?

Please feel free to send eMails or post replies here. I am subscribed
to the digest.

Thank in advance for any help you might provide.

Fetch-Rover-Fetch[at]K9University.edu
01-23-2005, 12:09 PM
rumplestiltskin wrote:
> A client has an old (v2.x Runtime for Mac) 4D database whose structure
> file is, unfortunately, compiled. The original developer no longer has
> the uncompiled version (lost in some move evidently). We'd like to
> revise the DB (actually, re-create it in 4D for OSX) but it would
> appear that we'd have to extract the data somehow into tab-delimited
> text for re-importation through the new structure.
>
> So there's the problem: How do I extract the data from the ".data" file
> into the five or six "tables" of data I know we really have (based upon
> what I see being related when we actually use the compiled app)?
>
> Please feel free to send eMails or post replies here. I am subscribed
> to the digest.
>
> Thank in advance for any help you might provide.
>
well... v2 did not allow 'hiding' of fields, or tables (invisible) so if
you can get into the 'User' environment you can see all the tables, and
fields.

select a table, get all records.

If I recall correctly, once there, you can choose 'export' from the
'File' menu - select all the fields, and set the delimiters to 253
(field seperator) and 254 (record seperator).

the reason for the odd seperators, is:
text fields - since you cannot see the raw structure, some or many of
the fields may be text - text fields can contain tabs, returns, and
similar characters, so by using Ascii 253 & 254 as delimiters you avoid
the problem of a mistaken 'end of field' or 'end of record' marker.

This will create a text file with the data for the selected table.

To get to the user environment - you need to log into the database as
either an administrator, or designer to get access. If the program
starts in the custom (menus) area, you need to get to the 'splash
screen' and type <option> + F.

If you need more info or help post here and/or join the 4D iNug - an
email support group for 4D - to find out how go here:
<http://www.4d.com/support/usergroups.html>