On 9/15/22 8:30 PM, Brian Barker wrote:
At 12:51 15/09/2022 -0700, you wrote:
I would like to import the table structure (_Not_ the data), SQL queries, data entry forms, and maybe as a bonus, the reports, fromĀ  one of the databases into the other database.

I'm no expert, but how about duplicating the original database and deleting all the data in it?

If and when the above is done: within the same destination database, can I merge (i.e. copy-append) data within one table into the new database table created in #1 above?

As above but don't delete the data in that table?

I trust this helps.

Brian Barker - privately


Brian et al,

Sorry it took so long to get back to this thread, but I got tied up elsewhere.

To make a long story short, I used the procedure in the LO Base Handbook, and it worked fine. They used a click, hold and drag operation to copy a table from the source database to the destination database. It even worked fine for queries, reports, and forms. In short time, I had what I wanted. It saved me hours of work. Here is the procedure I used, if anyone wants to know:

1. Open the source database and select "T_a_bles" under "Database" in
   the left pane. Do the same with the destination database.
2. Click, hold and drag the source database table name in the "Tables"
   pane, to the destination database "Tables" pane. Release the mouse
   button.
3. In the resulting "Copy" dialog, select "Definition" for only the
   format without the data, or "Definition and data" if the data is
   needed also. Note that in the "Table name" area, the source
   database.table is shown. If so, change it to the destination
   database.table. If this is not done, a "Table exists" error will
   result. (Note to devs: this should be changed!)
4. Click on "Next". The dialog now allows selection of which fields to
   copy. I wanted all fields, so I chose ">>". Click on Next.
5. In the resulting dialog, changes to the field formatting can be
   done. I didn't need to do anything there, so I clicked on "Create".
   The table is copied.

I then changed both databases to "_Q_ueries" in the left pane and used the click-n-drag method to copy the queries I wanted over to the destination database.

I then changed both databases to "For_m_s" in the left pane, and did the same for the form I needed to copy.

Needless to say, some tweaking needed to be done. The queries were still using the source database names, so they needed editing. I changed the table name and the query name, so the query name in the form "data" source needed to be changed also. This is done by bringing up the form in "Edit" mode and clicking on the "Form" icon on the left when no controls are selected. This will bring up the "Form Properties" dialog. Select the "Data" tab and edit the "Content" field for the proper data source, query or table.

When all that was done, I was able to access the new blank table and I am now entering data into it. I have modified the reports in LO, since AOO still does not have a reliable report generator yet.

Enjoy!

Girvin


Reply via email to