for some reason you cannot directly get the OID using SELECT LAST_INSERT_ID(); and you cannot return it within the same hive call as the insert call (????). Requires new procedure for 1.0.6.2