dbTalk Databases Forums  

Archiving database

comp.databases.filemaker comp.databases.filemaker


Discuss Archiving database in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
marshachristy@gmail.com
 
Posts: n/a

Default Archiving database - 10-03-2005 , 01:21 PM






Hi there,
I am trying to write a script to archive my database. I have written a
script that will perform a find such that the user enters the date and
it will find all the records preceding this date and then I would
archive these records.

So, I did this, I did my find and got my found set...and I have a clone
of my database where I have an import script that is just the import
command.

In my original database after I perform the find, the script opens the
clone, and when the clone opens it should run the import script on
startup(which it does) to import the found set...cept I get this
message

Table cannot be copied onto itself

Obviously I am not doing something right...otherwise it would work

Can anyone help me please?

merci,
chris


Reply With Quote
  #2  
Old   
Matt Wills
 
Posts: n/a

Default Re: Archiving database - 10-03-2005 , 06:47 PM






marshachristy (AT) gmail (DOT) com wrote on (10/3/2005):

Quote:
Hi there,
I am trying to write a script to archive my database. I have written a
script that will perform a find such that the user enters the date and
it will find all the records preceding this date and then I would
archive these records.

So, I did this, I did my find and got my found set...and I have a clone
of my database where I have an import script that is just the import
command.

In my original database after I perform the find, the script opens the
clone, and when the clone opens it should run the import script on
startup(which it does) to import the found set...cept I get this
message

Table cannot be copied onto itself

Obviously I am not doing something right...otherwise it would work

Can anyone help me please?

merci,
chris
That error means you're trying to import a table into itself. Probably
aby-product of using a clone.

Open the clone and re-specify the import from the master file.

Matt.

--



Reply With Quote
  #3  
Old   
marshachristy@gmail.com
 
Posts: n/a

Default Re: Archiving database - 10-03-2005 , 09:32 PM



I managed to get it to import the records but it always imports all of
the records not just the found set...is there some way to tell it just
import the found set?


Reply With Quote
  #4  
Old   
Matt Wills
 
Posts: n/a

Default Re: Archiving database - 10-04-2005 , 01:43 AM



marshachristy (AT) gmail (DOT) com wrote on (10/3/2005):

Quote:
I managed to get it to import the records but it always imports all of
the records not just the found set...is there some way to tell it just
import the found set?
From your description of the process, it should work. I do something
similar, except in the opposite direction: my destination file triggers
scripted finds in the source and performs the import.

Unless there is some other reason for the behavior of which I am unaware,
importing all records, not just the found set, happens when you import
from a closed file.

Is the source file remaining open?

Matt

--



Reply With Quote
  #5  
Old   
marshachristy@gmail.com
 
Posts: n/a

Default Re: Archiving database - 10-04-2005 , 08:15 AM



yes it is...sighs this is what I do

Enter Find Mode []
Insert Calculated Result(DateField, "<" & DateIWantToArchiveFrom)
Perform Find[]
Open File[Open Hidden; "CloneDatabase.fp7"]
Perform Script("Import" from file: "CloneDatabase.fp7")

or I try not using the last line and having the clone run the script
from startup.

I just have an import statement with no options in the import script.

But each time, it leaves the master open for sure, and it just copies
all the records...why why why? I tried all kinds of variations on
it...save me!

thanks!
chris


Reply With Quote
  #6  
Old   
FP
 
Posts: n/a

Default Re: Archiving database - 10-04-2005 , 08:19 AM



It might be more efficient to backup your data using "Save A Copy As".
This gives you a complete data backup, it can be run on shutdown, and
you can specify where the backup file is to go and what its name is.
If you ever have to restore your data from the backup, you just throw
out the original file, rename the backup to the original file's name
and away you go.
If you need to import into an updated version of the files, it's easier
to import from a FileMaker file since it allows for import by field
name.

Anyway, just a suggestion.


Reply With Quote
  #7  
Old   
marshachristy@gmail.com
 
Posts: n/a

Default Re: Archiving database - 10-04-2005 , 01:37 PM



Umm well I don't want to keep old records in the original database,
just in the archived one. If I could just get it to export the found
set, then I would add in delete records in found set in my script right
after...but right now, I was just trying to get it to export the
records in my found set before I delete them. I don't want to delete
them and realise the script doesn't work :S




FP wrote:
Quote:
It might be more efficient to backup your data using "Save A Copy As".
This gives you a complete data backup, it can be run on shutdown, and
you can specify where the backup file is to go and what its name is.
If you ever have to restore your data from the backup, you just throw
out the original file, rename the backup to the original file's name
and away you go.
If you need to import into an updated version of the files, it's easier
to import from a FileMaker file since it allows for import by field
name.

Anyway, just a suggestion.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.