I\'m using the MySql Connector .net, and I need to get the insert id generated by the last query. Now, I assume the return value of MySqlHelper.ExecuteNonQuery
MySqlHelper.ExecuteNonQuery
Just use LastInsertedId field
MySqlCommand dbcmd = _conn.CreateCommand(); dbcmd.CommandText = sqlCommandString; dbcmd.ExecuteNonQuery(); long imageId = dbcmd.LastInsertedId;