in reply to Genius or Insanity: My minimal DBI

Any comments or questions?

Some databases get persnickety if you don't manually "finish" a statement handle (cursor) before attempting to reuse it when there are still pending results. That's going to be tricky the way you have things set up.