The secret lies in code reuse. Remember, that is one of the tenets of our faith!
If you look closely, you will notice that the subroutine is used in my other barcode related snippets. The database code comes from another... This was just a bunch of cut and paste. So I stand behind, "maybe five minutes of coding."