When the transport maximum for reabsorption in the kidney tubules is exceeded, as a result of type 1 diabetes or as a result of type 2 diabetes