Normal Topic Copy database in application (Read 1469 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Copy database in application
Apr 23rd, 2004 at 9:54pm
Print Post Print Post  
I recently detailed the steps for copying a form within the same database (http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=archived;action=display...; But I am unable to see how to copy a database within the same application (OriginalName).

Basically I am trying to copy database01 to database02, keeping the forms, and/or the records.  I can always delete the records if not wanted.
==========================
Here are the steps that I followed (hope I got them all):

Open Sesame Designer,
Open Application OriginalName.db
From the tree, Application, Save as New Application, TempName.dsr
Open Application TempName.db
Set a designer file, TempName.dsr
From the tree, Manage a Database

For each database not being copied:
...............Select Manage Fields
...............In the Transaction Builder, Select a Database, Action=Delete a database, Add Transaction to Batch, Run Batch, Close.

For each database being copied:
...............Select Manage fields
...............In the Transaction builder, select a database, Action=Rename a database, enter the new name (database02), Add transaction to Batch, Run Batch, Close.

From the tree, Application, Save as New Application, TempName.db, replacing it when prompted.

Open Sesame Database Manager
File, Open Application, TempName.db
From the tree, Seach/Update, select the forms, press F10 to get all records in the record set.
From the tree, Mass Delete to remove all records.

File, Open Application, OriginalName.db
from the tree, Application Utilities, Merge Application, select TempName.db
======================
Whew!  Now I can delete the TempName.db using Explore.
I now have a copy of the empty database, "database02" in addition to the original database, "database01" in the same application.

I had to include the steps to remove the existing records, or else when I copied a database with sub forms I got multiple blank records in the parent form.  If I want the existing records I will need to go through a process of copy records from one database to another one.

This seems to work but is awkward, have I missed something?  There must be an easier method.

Perhaps this capability can be added in a future release?  Kind of like Q&A's File, Copy, Copy Design, With/Without records.


« Last Edit: Jun 8th, 2004 at 6:36pm by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Copy database in application
Reply #1 - Apr 24th, 2004 at 12:53pm
Print Post Print Post  
Bob,
Backup the application and then merge the application with the backed up application. Since the backed up application will have the same name database, Sesame will rename it adding 000 at the end. Is it any simpler?
  
Back to top
 
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Copy database in application
Reply #2 - Apr 25th, 2004 at 4:08pm
Print Post Print Post  
Thanks for pointing that out Bharat_Naik.

After I went through that process, wrote it up , and read it later. the same thing occured to me.  Just use Explore to make a copy of the application.  Unfortunalely, it only reduces some of the steps.  It is still necessary to go back in and delete the "duplicate " databases that are not wanted in the resulting merged database, and to rename the one that is wanted.  So, if you have 8 databases in the application, and want to copy one, you still need to copy the application, merge the applications, go in after the merge process and delete the extra seven unwanted databases.  rename the desired database copy, and then go back and delete the temp copy of the original database.

Still think the request for an easier method has some merit.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Copy database in application
Reply #3 - Apr 25th, 2004 at 7:19pm
Print Post Print Post  
I agree. I did not think it was much simpler especially if the application has multiple databases.
  
Back to top
 
IP Logged