Jump to content

Automatic Data Retrieval


This topic is 5757 days old. Please don't post here. Open a new topic instead.

Recommended Posts

My wish:

Loop through every table one at a time.

Search for all records that have been created or modified past a certain date/time I specify (in global? Every file has identical CreateStamp and ModifyStamp field names) and export that data to file names equal to the table name. I assume I will pull VBScript into the mix for renaming the files. I am looking for the most elegant way of automating the script process to export this data. We are not (fully) in vs. 8 yet (although I have Developer 8 which can be used) in case you suggest variables here.

I would then like to script the reverse - importing back into my appropriate tables but as two separate steps. The pause between would be User (me) verifying data integrity (possibly in another FM file?) or even just by visual examination of the export data.

How much needs to be hard-coded in script? Can I utilize RelationInfo(), TableNames() or Get() functions? I am more than happy to use a layout of every table and switch between them for the import and/or export. If properly scripted, I envision layoutswitch tied into the mix.

Ideas on how best to approach this?

UPDATE: I should mention that I will be exporting from one file to another identical file - example: OurFileTrash.fp7 export then import into OurFile.fp7. set to update/add to, flipping through the layouts and just doing it. So the script will reside in both files by the very nature that they are indentical (except one is trashed).

UPDATE2: Sorry. I want to export all fields. I didn't really specify that. :^)

LaRetta

Edited by Guest
Added update then update 2
Link to comment
Share on other sites

There is another thing I am going to begin documenting. I make design changes day and night; some tweaks and some major. I am going to begin listing what those changes are (with date/time) so I will know what I have to re-create. :blush2: :smile2:

Link to comment
Share on other sites

LaRetta, how about this-

Start with DBa.

Create an identical (I think that is necessary, depending on how you are validating your data) DBb.

Export your data into individual files called Tab1, Tab2, etc. These could be text files but probably fp7 might be easier.

Perform an external script, from DBa, in DBb to import all the tables. Then use another (or contination) script to validate your data in DBb.

(Would you delete the data you've exported here?)

Lastly, import your data from DBb into DBa.

I did somethnig similar in V3 and then V6. Haven't had much experience yet with import/export and tables but it should all work.

Link to comment
Share on other sites

This topic is 5757 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.