Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Tuned Listener
Margriet
Posts: 11
Country: United Kingdom
Message 1 of 9 (2,558 Views)

Batch processing re-index

Is it possible to re-index ACT 2009 v11 via batch processing or is it only posible to re-index the database by hand?

Copper Contributor
Carlton_Jones
Posts: 98
Country: United States
Message 2 of 9 (2,547 Views)

Re: Batch processing re-index

[ Edited ]

While a little more complicated than a simple .cmd file one option is to create a small ACT SDK Framework application that performs database maintenance when launched. Then place this in the windows startup folder.

 

 

Example:

 

//When the program is launched from Windows Startup and the form is loaded we perform our maint. private void Form1_Load(object sender, EventArgs e) {

 

 

ActFramework ActFwk = new ActFramework();

//Log on to the database you perform operations too //Lots of ways to set this depending on how complicated you want to get //Right now just hard-coded to perform maint. on the ACT12Demo.pad ActFwk.LogOn(@"C:\Documents and Settings\All Users\Documents\ACT\ACT for Windows 12\Databases\ACT12Demo.pad", "Chris Huffman", ""); try { //Lock DB for maint ActFwk.Database.LockDatabase(DatabaseLockReason.General); //Do repairs ActFwk.CheckDatabase(); ActFwk.ReindexDatabase(); ActFwk.RepairDatabase(); //Unlock ActFwk.Database.UnlockDatabase(); //Some sort of dialog to indicate finished MessageBox.Show("Completely Done!"); } catch(Exception ex) { MessageBox.Show(ex.ToString()); //Important to unlock database if Exception is encountered!!! ActFwk.Database.UnlockDatabase(); } }

 

 

 

Hope this helps,

 

Message Edited by Carlton_Jones on 04-14-2009 03:23 PM
Message Edited by Carlton_Jones on 04-14-2009 03:24 PM
Carlton Jones
Sage Software
Tuned Listener
Margriet
Posts: 11
Country: United Kingdom
Message 3 of 9 (2,538 Views)

Re: Batch processing re-index

If I understand correctly you need to buy ACT SDK Framework before you can re-index automatically if you restart the computer. The point is the ACT software will be standing on a central server (that we want to restart only if there is really is a need for it) and we want to re-index the ACT software automatically after backing up the server.
Nickel Super Contributor
Tdavis
Posts: 441
Country: UK
Message 4 of 9 (2,536 Views)

Re: Batch processing re-index

You don't need to buy anything if you already have ACT!.  You just need to copy the required files from an ACT! cd and you can connect to the database across the network.  If you aren't a developer or don't have access to one and would like something written you can contact either me or any other developer in this forum and we could write something for you.  It is only a very small job to do.

 

Tom

Tuned Listener
Margriet
Posts: 11
Country: United Kingdom
Message 5 of 9 (2,529 Views)

Re: Batch processing re-index

Tom,

 

Nice to hear I don't need to buy another software.

Can you explain how I can write some file that will re-index automatically at for example 10.00h?

I want to learn how to do it so I can do the next time myself and help other people in the futher.

 

Nickel Super Contributor
Tdavis
Posts: 441
Country: UK
Message 6 of 9 (2,523 Views)

Re: Batch processing re-index

You would need to download the SDK from act.com (sorry I don't have the exact link) then have a look at the framework examples.  Have you coded in vb or c# before?  There is a basic sample further back in this thread of the code you would need to write.

 

Tom

Tuned Listener
Margriet
Posts: 11
Country: United Kingdom
Message 7 of 9 (2,518 Views)

Re: Batch processing re-index

I only used PHP/SQL.

I can follow the preview but if I'm correct it only can be used if you will start the script by hand or when you turn your computer on. But I want to start the script automatically at for example 10.00h

 

Nickel Super Contributor
Tdavis
Posts: 441
Country: UK
Message 8 of 9 (2,514 Views)

Re: Batch processing re-index

For a start you would need visual studio to develop the software.  Once it is written you could stick it in the windows scheduler much like any other batch script/application; it would just be a normal exe file.

 

Tom

Copper Contributor
Carlton_Jones
Posts: 98
Country: United States
Message 9 of 9 (2,503 Views)

Re: Batch processing re-index

OK after a bit more explaination of what you need. Have you looked into the ACT Scheduler? That sounds like all you need and is already part of the Premium Tier product.

 

Tools -> ACT! Scheduler...

Carlton Jones
Sage Software