Solved

ACT 2000, exporting History using the SDK

Posted on 2007-03-22
6
854 Views
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  

objDatabase3.NOTEHISTORY.MoveFirst

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"
      Stop
   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

   objDatabase3.NOTEHISTORY.MoveNext
Wend

==============================

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.
0
Comment
Question by:kkonkle
6 Comments
 
LVL 7

Expert Comment

by:SStroz
ID: 18778061
kkonkle,

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:

http://www.jltechnical.com/Exporter.htm

Steve
0
 

Author Comment

by:kkonkle
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.
0
 
LVL 7

Expert Comment

by:SStroz
ID: 18784025
kkonkle,

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

Steve
0
 
LVL 1

Accepted Solution

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

Computer101
EE Admin
0
 

Expert Comment

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Creating and Managing Databases with phpMyAdmin in cPanel.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now