ABC .Insert() vs Add() Speed using ODBC Driver with MySQL

@JonW I understand, SQL is best option for adding lot of records but I try to avoid that because of SQL injection stuff…
I’m happy with the ADD-ing of records (I do not work over WAN, everything is on server and 1-2 sec for 6000 records is pretty good result for me).
I still have the problem by add records (or ABC insert) in the same time. Attached is sample app and dct with 4 buttons. Just compile and press “Run MyProc” and second later, click on Run MyProc 2".
You will see error by inserting a record. I try with CriticalSection (it is commented inside a code) and it works OK (you can click as many times you want on each button) but the problem is when you run 2 instances of exe file - in that case error raises again :frowning:
Any idea how to add records using other ways or is the ServerAutoInc only option for ODBC drivers?
test.zip (563.4 KB)