[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Import ALL records from one FM database to another, NOT just found set

I've been tasked with updating a solution developed in FM5.5 (staying in 5.5 for now).

I have developed an installer program (not in FM Pro) the customers will use
to put the new solution on their computer.  Before installing the new FM files,
the installer makes a copy of all the database files to be imported into
their respective "new" files after the installation.

The problem I am having is when I call the Import script from the new database, it
only imports the current found set of the old database.  Obviously, the customer may
have had any number of records in the found set (even zero) when they last exited
their solution.

1) There is no script in the old database to "show all records".
2) The solution runs in kiosk mode, so I can't have the customer open
    each DB and hit <ctrl J> (nor would I want to burden them)

Any ideas?
0
andersen58
Asked:
andersen58
  • 2
1 Solution
 
billmercerCommented:
Unfortunately, there's not an elegant solution to this problem. The usual procedure is to run a script to show all records before doing the import. The problem is, your existing files don't have such a script. The only option I can think of is to use the Recover command.

If you know the filenames, you can script a Recover operation on each file, and then import your data from the recovered copy instead of the original file. The recovered copy will default to showing all records. This should be a one-time-only option though, it's really not appropriate as a permanent solution.

You will want to add a script to each file to show all records so that future upgrades don't need to do this.
0
 
andersen58Author Commented:
You, my friend, are a genius!  (As my palm hits my own forehead for not thinking of it!)

I tried every sort of relationship link I could think of and did manage to script
getting ALL the files to a zero found set using a weird "non" relationship.  I then called
an existing script in the files that only had "Show Omitted"  (Why the previous author had
a script with only "Show Omitted" in it, I'll never know... but it came in handy for me)

However, I like your Recover idea better.  Not only do I get the data in a
single found set, in theory, it will "clean up" any problems with the data before
I import into the new files.  My installer is written in VB, so I can move the files
around after the fact and rename, etc.

Great work, thanks.
0
 
billmercerCommented:
Glad I could help!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now