bltoolkit icon indicating copy to clipboard operation
bltoolkit copied to clipboard

Ignore insert need

Open gmlexx opened this issue 12 years ago • 0 comments

Hello, Igor

Can you add extension (or parameter for insert extension) to build "INSERT IGNORE INTO" sql statement, please?

This would be extremely useful for concurrent inserts into one table like this http://stackoverflow.com/a/4475904

I've just tried a workaround with InsertOrUpdate, but mysql driver is a little buggy and ExecuteNonQuery with "INSERT .. ON DUPLICATE KEY UPDATE ..." always return 1 rows affected instead 1 or 0.

"INSERT IGNORE" works fine and return 0 or 1.

gmlexx avatar Dec 26 '13 08:12 gmlexx