Community
Showing results for 
Search instead for 
Do you mean 
Reply

Creating new database

Accepted Solution Solved
Astute Commentator
Posts: 10
Country: Russia
Accepted Solution

Creating new database

[ Edited ]

Hi All!

 

Is is possible to create a new database using SDK?

Or is there a way to get an "empty" database file with SDK?

I am looking for a way to "convert" Access database to ACT! database.

 

I am using ACT! 2008  

 

Thanks,

Alex. 


Accepted Solutions
Solution
Accepted by topic author Alex_Roll
‎09-25-2015 03:20 AM
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Creating new database

Hi Alex,

 

You can use the ActFramework.CreateDatabase(...) and the most appropriate overload, however as Matthew said this will not create an empty copy of the source.

 

Unfortunately you will need to develop the buisiness logic to replicate over the EntityFieldDescriptors, ActivityTypes and Opportunity objects. It is tedious code but can be done and has been done. I think some of the Consultants on this board actually have dB replicator products available for purchase if that is of any use?

 

Off the top of my head:

 

Stan Smith @ ADSComputing

Mark Hammer @ DesignR1

Jim Durkin @ DurkinComputing

 

HTH

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog

View solution in original post


All Replies
Employee
Posts: 1,163
Country: USA

Re: Creating new database

Are you wanting an empty Act database? If so, you can do this through the application, File -> Save Copy As -> Save Empty Copy.

 

If you just want a blank SQL database you can create this in a variety of ways, SQL management studio is one possibility. 

 

As for converting from Access to Act, you could export the data to excel spreadsheets and import them, but this could result in mapping challenges. There are a couple of import addons out there already if you want to explore that option, I can't remember off the top of my head though if they work with access databases.

Matthew Wood
Act! SDK Support
Community Moderator
Astute Commentator
Posts: 10
Country: Russia

Re: Creating new database

Hi Matthew!

 

>Are you wanting an empty Act database? 

 

I want an empty Act database.

 

>File -> Save Copy As -> Save Empty Copy

 

I am developing a plugin for ACT, that should load data from Access database to new empty ACT database.

Of course a user can prepare the database first, or I can show him a message like "give me your clean db pls".

But can I make empty Act database through the framework? 

 

Thanks,

Alex. 

Employee
Posts: 1,163
Country: USA

Re: Creating new database

You cannot create a new database through either the framework nor the UI. This method seems like it'd end up consuming a huge amount of hard drive space depending upon how often a new database would need to be created and whether they'd be disposed of after use.

Matthew Wood
Act! SDK Support
Community Moderator
Astute Commentator
Posts: 10
Country: Russia

Re: Creating new database

OK. Thank you.

 

Best regards 

Alex. 

Solution
Accepted by topic author Alex_Roll
‎09-25-2015 03:20 AM
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Creating new database

Hi Alex,

 

You can use the ActFramework.CreateDatabase(...) and the most appropriate overload, however as Matthew said this will not create an empty copy of the source.

 

Unfortunately you will need to develop the buisiness logic to replicate over the EntityFieldDescriptors, ActivityTypes and Opportunity objects. It is tedious code but can be done and has been done. I think some of the Consultants on this board actually have dB replicator products available for purchase if that is of any use?

 

Off the top of my head:

 

Stan Smith @ ADSComputing

Mark Hammer @ DesignR1

Jim Durkin @ DurkinComputing

 

HTH

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Astute Commentator
Posts: 10
Country: Russia

Re: Creating new database

Hi Vivek!

 

Thank you very much for good news.

I did not find ActFramework.CreateDatabase method in SDK documentation and it is why I did ask.

I think I can develop a replication code. 

 

Best regards,

Alex. 

Astute Commentator
Posts: 10
Country: Russia

Re: Creating new database

Hmm. Possible another way - ActFramework.CopyDatabase, then open just created DB and delete old data.

But how to clear the database? I suspect two methods - ActFramework.PurgeDatabase and ActFramework.DeleteOrphanData.

 

Best regards,

Alex. 

Employee
Posts: 1,163
Country: USA

Re: Creating new database

I've not used the Purge method, but DeleteOrphanData only removes notes/histories that are no longer associated with a top level entity (contact/companies etc).

Matthew Wood
Act! SDK Support
Community Moderator
Astute Commentator
Posts: 10
Country: Russia

Re: Creating new database

Thank. But how is it possible? I thought notes and histories are linked to contacts with foreign key in the database.