01-17-2012 06:30 PM - edited 01-17-2012 06:31 PM
Have you looked into the RestoreDatabaseAs method. I used it a while back for another 3rd party product we developed. The client needed to create a database with pre-defined fields and business object such as Products and activity types. The code then uses the ACT Backup Zip file to restore as on the new target machine.
-- Jim Durkin
02-18-2012 04:08 PM
I just stumbled on this month old thread looking for something else.
I'm not sure I understand the comment in an early reply from a moderator saying "you cannot create a new database in either the Framework or the UI".
There is a method in the Framework class: ActFramework.CreateActDatabase()
It has several overloads. I recall using this method to force instantiation of the Managers in the Framework (for purposes of high level testing) without having to login to a production database. I also remember someone saying they use this method as a "facsimile" login, again, causing the Framework managers to instantiate when you don't have a User ID or password for an existing database.
This may be what you are looking for Alex. But be forewarned. I also remember that executing this method takes time -- enough time to brew a cup of coffee -- actually, maybe 30 seconds or more before the call returns.
05-03-2012 01:31 PM
No "empty" ACT database is truly empty. There are system tables that are populated.
There are a couple of ways to make an empty ACT! database.
As mentioned previously, you can use ActFramework.CreateActDatabase. This is a barebones, basic ACT database.
If you want to make an empty copy of a database with customized schema, use ActFramework.CopyDatabase (string newDBName, string newDBLocation, string newSuppFilesLocation, ProductTier tier, bool share, Contact contact, ContactName contactName, string userLogOn, string password).
This is equivalent to Save Copy As, empty copy.