I know you prefer the DBI functions but the new SQLx functions are much better, albeit a bit more complicated. If you were using the SQLx functions, you could just use SQL_GetInsertId(h_query).
I am not sure of how one would go about doing it with the old DBI functions.