Error: 'Cannot update, currently locked'. #!#

Dear all,

I wrote 2 programs using Delphi 5.0, MDAC 2.5, ADO with MS Access 2000
database.

Both the 2 programs will write records to the same table in the Access
database. And when I run these 2 programs parallelly, I sometimes got an
error 'cannot update, currently locked'.

The table having a composite primary key, the first field of the primary key
is an autonumber field. One of my program creates 2 threads that both will
write records to the table. Is it the cause to the error?

And I found that this error only happened in Windows 2000 platform, it seems
didn't happen in Windows 98. I don't know whether this is the cause to the
error.

Could anyone please help?

Cheers,
Gavin