Robinson, Jeff

I’m running:
GeniusConnect Version:4-2000(400901) Multi-Byte build Demo/Business with Mail
Outlook 2003 version
MySQL database

I have two PCs both with GeniusConnect set up exactly the same. This problem was occurring with the Demo version and occurs the same way when I upgraded to the Business version.

I have Outlook set up with a rule so when a certain email comes in, it gets moved to an Outlook folder named “Certificates”. I want to save the attachment that comes with the email to a local folder and enter the mapped information to the MySQL database.

I have two items mapped for Mail: ReceivedTime and Subject.

On a Vista computer running a demo version of GeniusConnect with a POP email account, when I click on Store Item for each of 6 emails, each one gets a unique entry in the database and the attachments are stored correctly. This is how it’s supposed to work.

On an XP SP2 computer with a POP email account and an Exchange Server account, when I store each item, sometimes 2 and sometimes 3 will ‘update’ rather than ‘insert’. The attachments are saved, but I’ll have only 3 or 4 entries in the database. The emails are the exact same emails used on the Vista computer. Also, it doesn’t matter if I have “Use Cached Exchange mode” enabled or disabled for the Exchange Server email account. This one was running the demo version, but has been upgraded to Business.

I’ve narrowed it down to 2 emails that this happens consistently.
Email #1:
Subject: C of A: material=CONDUCTRON DP ACTIVATOR Concentrate batch=0004649307
ReceivedTime: 10/24/2008
Attachment name: QMCertificate20081024141708712.pdf

Email #2:
Subject: C of A: material=NIPOSIT(TM) 428 D NICKEL STRIPPER batch=0004336666
ReceivedTime: 10/2/2008
Attachment name: QMCertificate20081002092638357.pdf

When I click Store Item on either of these first, then click Store Item on the second one, it always updates the database with the second one. I expect it to Insert rather than Update because the emails are different from each other.

Every time I start this test, I empty the database tables and the local folder. I also emptied the Outlook temporary file folder once, but that didn’t change anything.

Sorry for the long post, but I wanted to be sure to give you all the info.

Any idea what’s causing the XP computer to act this way?

I'm assuming the GeniusConnect software is comparing the mapped items to decide if they are the same. Am I wrong about this?

GeniusConnect documentation search (User Manual Downloads...)

this looks like your Primary key definition is not correct or your SQL Statement for prim.key value generation is returning duplicate keys!
Robinson, Jeff

Thanks for getting back to me.

I have the primary key definition set on both computers to:
select IFNULL(max(gc_id)+1, 1) from mail

Both worked and I had tested them with the "Test Query" button.

I did some more searching of the forum, mostly trying to figure out what "prim.key value generation" is, and I ran across some comments about clearing the primary keys. I found how to do that in the help manual and it fixed the problem. I don't know what hidden values were mis-set, but they've been cleared out and everything is working as it should.

Thanks again for the help.
Similar Topics