ダブルクエリを使用して、関数 LAST_INSERT_ID() 最初のクエリを実行して最後の現在のクエリを取得した後:
Dim insert_coupon_query As String = ("INSERT INTO qa_discountcoupons (status_code) VALUES (5); SELECT LAST_INSERT_ID()")
Dim cmd_query As New MySqlCommand(insert_coupon_query, objConn)
Dim cmd_result As Integer = CInt(cmd_query.ExecuteScalar())
MsgBox(cmd_result)