I recently found that any open recordset will cause "select last_insert_id()" to be 0, since upgrading from MySQL 5.1 to MySQL 8.0.
Server side script ASP (Yeah, I know)