>Could you elaborate what approaches you are referring to?
In the first part of your code, you are using another command, following the one that does the insert, to get the auto incremented value. In the second part of your code, you showed an example of using the event handler to achieve the same.