Microsoft Access key violation error.

This is becoming a critical problem with my current project, and I need to
solve this yesterday.

Previously I used the MSACCESS driver built into the BDE (DAO 3.5, BDE
4.51).  This works great in the primary thread, but dies when multithreaded
(although DAO is apartment model threadable.  Not sure why Delphi doesn't
take advantage of that).  I have been forced to use the ODBC Microsoft
Access driver (3.51.102900 - the brand new driver).  Although it is somewhat
slower, it is multithread capable.

However, an odd problem that I have brought up before is occurring, and I am
not sure if I am doing something wrong, or if it is a bug.  In my Access
table, I have an autoincrementing primary key field.  If I call up a record
(in this case using Locate), put it into edit mode, and then make changes
and attempt posting, I get a "Key Violation Error".  It appears that Delphi
confuses the driver (or vice versa) and makes it think it wants another copy
of the same record, and of course two copies of the same primary key cannot

I found that when editing I can get around this by not posting, but by
rather calling Next on the table I am editing.  Apparently this implicitly
calls Post.  This avoids the key violation error.

However, I just dropped a TDBGrid onto my form, and if I try editing record
I get the wonderful key violation error.

Has anyone had this error, and hopefully solved it?  Any comments or
suggestions would be VERY appreciated.  Thank-you.

Dennis Forbes