Thanks Oleska for your interesing info. I thought that as the selectKey is "inside" the insertion tag in IBatis, Ibatis would take care for the whole operation to be atomic, so Oleska's example could never happen, but I'm not sure about it.
Can anyone clarify this? Anyway, having a look at the MSDN and at http://www.databasejournal.com/features/mssql/article.php/10894_3307541_2 may help. Thanks a lot :) Pablo.

