04-14-2009 05:52 AM
Is it possible to re-index ACT 2009 v11 via batch processing or is it only posible to re-index the database by hand?
04-14-2009 12:21 PM - edited 04-14-2009 12:24 PM
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.Ge
neral); //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,
04-15-2009 02:06 AM
04-15-2009 03:46 AM
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
04-15-2009 04:47 AM
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.
04-15-2009 06:45 AM
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
04-15-2009 07:17 AM
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
04-15-2009 08:36 AM
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
04-15-2009 09:52 AM
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...
