ACT 2000, exporting History using the SDK

Posted on 2007-03-22
Medium Priority
Last Modified: 2012-08-15
I am using Visual Basic 6 to write a program to pull all the contacts (and their notes/history) out of ACT 2000 and put it into an MSSQL database.

For the most part it is working fine, but every so often the loop that is grabbing the History items slips and gets "out of synch", and I don't understand why.  

Here is the general layout of my loop and then I'll explain what I mean by "out of synch"

//ACTuniqueID is the unique ID for this particular contact
objDatabase3.NOTEHISTORY.Lookup 29, ACTuniqueID, 1  


a = 0

While Not objDatabase3.NOTEHISTORY.IsEOF
   //Check to see if we've moved beyond the EOF
   If a > (objDatabase3.NOTEHISTORY.RecordCount + 1) Then
      MsgBox "History count has gone over record count"
   End If

   historyDate = objDatabase3.NOTEHISTORY.Data(27)
   historyType = objDatabase3.NOTEHISTORY.Data(25)

   //getACTname does another lookup (with objDatabase2 ) to translate the unique ID to a contact Name
   historyOwner = getACTname(objDatabase3.NOTEHISTORY.Data(6))
   historyItem = objDatabase3.NOTEHISTORY.Data(26)

   //Code to enter the 4 bits of info we pulled goes here

   a = a + 1



So in theory this should do a lookup to get only Contact X's notes/history, move to the first item in that list, and then walk one by one pulling out the 4 bits of info I want and inserting them into the MSSQL DB.  

For the most part it does this, it'll do 100 in a row with no problem, but once in awhile it hits a contact (A different one on each run) and "slips"... MoveNext basically stop working, EOF is never reached, and my variable 'a' just grows and grows (hence the message box lines at the start of the loop)

If I query objDatabase3.NOTEHISTORY.Position it will be lower than the RecordCount, but calling MoveNext does not increment it and I basically have to scrap the run and start over.

Has anyone seen this before, or had similar issues with the SDK?  I suspect it's a memory or buffer issue, but I don't see anything about it on the ACT site, or in the SDK documentation.

I know there is a 3rd party program I could use to export the notes/history, but I'd like to be able to just do it with the SDK if possible.  It does work for most contacts, I don't see any common history item type or content that seems to hang it up, seems fairly random when it stops, which is why I suspect memory/buffer issues.

Please let me know if you have any suggestions.
Question by:kkonkle

Expert Comment

ID: 18778061

You could be hitting bad data.  Have you tried running a scan and repair using actdiag - also a compress and reindex?

I wouldn't waste time when this tool is only $250:



Author Comment

ID: 18779021
Actually yesterday evening we tried consolidating everything on a single machine, and had good success.

Originally it was running from my machine, going over the local network to ACT, coming back to my machine, then going over the local network to another machine to store the data.  Not only that, but during the day ~50-70 people were inside that ACT DB using it too, which I'm sure didn't help things.

Once we moved everything to a single machine, with a copy of the ACT DB and a copy of the MSSQL DB saved locally, it ran just fine and my history out of synch warning never fired off.

I was not aware of actdiag though, might be a good idea to run that anyway, at least a compress and index.  Thanks for the tip.

Expert Comment

ID: 18784025

I see - you were probably running into some network delays.  I'm glad everything is working now.

Run the "scan and repair" option in actdiag before the process and then open ACT! and click File, Database Administration, Compress & Reindex.  That will help reassign orphan records, fix index problems, etc.

If you want to be really complete you can manually delete the indexes (also an option in actdiag) - these are *.**X - ACT! will rebuild them on the next database open.  Sometimes those .dbf index files would become damaged.  That might be overkill if you're getting good results.

Good luck


Accepted Solution

Computer101 earned 0 total points
ID: 19254577
PAQed with points refunded (350)

EE Admin

Expert Comment

ID: 38296441
Would you be interested in sharing/selling your vb solution?

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question