3 messages in com.mysql.lists.mysqlRe: Duplicate Key problem (UPS software)
FromSent OnAttachments
css20 Jun 2006 15:44 
Brent Baisley20 Jun 2006 18:14 
Vince LaMonica20 Jun 2006 21:23 
Subject:Re: Duplicate Key problem (UPS software)
From:Vince LaMonica (vj@cullasaja.com)
Date:06/20/2006 09:23:40 PM
List:com.mysql.lists.mysql

On Tue, 20 Jun 2006, css wrote:

} When someone voids a shipment in the UPS software, it sends another } INSERT to the database, with the same data as the original row, the only } difference being the void column is now "Y"; } } This of course doesn't work because "Duplicate entry 'BLAHBLAH' for key } 1"

We use Worldship with MySQL via MyODBC and FileMaker, so I have a good amount of expierence using this software. What I did to avoid this issue was I created a MySQL table that had a different primary key than the UPS tracking number. Eg: I just made a simple auto-inc "ID" column that counts upward from 1.

Using the Worldship's ODBC mapping preference, I made sure that *no* UPS field was mapped to this ID column, so that way when Worldship sends an insert, MySQL will auto-populate the primary key. This avoids the duplicate error messages you are getting, and makes it quite simple to figure out voided transactions from real transactions.

If this didn't make sense, feel free to e.mail me and I can give more details off list, and include some screenshots from Worldship showing how I set it up to talk to MySQL.

/vjl/

When there's nothing else to read: http://w3log.vjl.org/