[AccessD] Exporting help requested

Gary Kjos garykjos at gmail.com
Tue Feb 6 14:36:11 CST 2007


I think I would be inclined to write this file out using File IO and
to read the data using DAO with Do While loops for the various levels
of the data hierarchy.

See Seth Galitzers website for info on the File IO
http://www.cis.ksu.edu/~sgsax/files/download/file_io.txt


GK

On 2/6/07, ewaldt at gdls.com <ewaldt at gdls.com> wrote:
> I have a database with a self-related table. I'll use a simplified example
> table:
>
> PartNumber
> PartDescription
> Parent
> Qty
>
> As should be obvious from the field names, the PartNumber is related as a
> child to its given Parent.
>
> Access is not to be the database for this project (sorry for the
> blasphemy; it's not my idea). There is a vertical application DB (I'll
> call it VADB) with CAD-type capabilities that Access does not possess
> (OTOH, the rest of the VADB is 80s technology; it's run in a DOS window,
> and minimum requirements include DOS 5 and a 386!). I am trying to use
> Access as an intermediary to convert data from a UNIX flat file to this
> VADB. I need to produce a text file in the format the VADB requires for
> importing.
>
> The target file would look like this, with each line below representing a
> line in the target file:
>
> Parent (and all data on the parent)
> .Child (and all data on the child)
> .Child (and all data on the child)
> ..Grandchild (and all data on the grandchild)
> .Child (and all data on the child)
>
> And so forth. The leading dots are necessary, although I could probably
> insert those manually or export the whole puppy to Excel and have Excel do
> it via VBA. The main point is that all of the lineage has to be included.
> That is, all of the "grandchildren" have to appear every time they're in a
> "child'; if the original table has only 200 records, the resulting target
> file could easily have over 1000, with many of the records repeated many
> times.
>
> The closest I've come is to create a report grouped by the Parent and
> export it to Excel. However, this only goes down one level, and does not
> include the leading dots, of course. Is there a way to have Access go down
> all levels? Is there a better way to do the whole thing?
>
> TIA,
>
> Tom Ewald
> GDLS
>
>
>
>
>
>
>
>
>
>
>
> Thomas F. Ewald
> FCS Database Manager
> General Dynamics Land Systems
> (586) 276-1256
>
>
>
>
>
> This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
Gary Kjos
garykjos at gmail.com



More information about the AccessD mailing list