As you can see from listing 9-3, I used Data Fill Error Event Args's members to get information about the error.Listing 9-4 and 9-5 show the code for the Row Updated and Row Updating event handlers.adapter has a Fill Error event that occurs during a fill method.It allows a user to determine whether a fill operation should continue.
Hint: Always know what your ORM (if you're using one) is doing, because the ORM can help you with automatic batching/bulking in many cases.
The difference is much more drastic if each call to the SQL engine has to be done over the network from another process.
Again, the benchmark code is available from a gist, and I will paste it to the end of this blog post as well.
This cost is much more severe if we unnecessarily create many server roundtrips for a task that could be done in a single roundtrip, namely by using a SQL bulk .
If doing everything in a single statement isn't possible due to the limitations of SQL, we can still save roundtrips by grouping statements in a block, either by using an anonymous block in databases that support them: (You can easily send these anonymous blocks over JDBC, as well!