EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Upload/Download gauge (progress bar) - FTPS -

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
Posted: 09/22/2006 11:52:59
by Strycek Vladimir (Basic support level)
Joined: 08/02/2006
Posts: 20

Hi, im using FTPS from SecureBlackBox and to show upload progres i use:

p := Round((Current*100)/Total);
prenos_gauge.Value := p;

This is onProgress event and p is integer..

It works perfectly when uploading but when i trie download it show "Project test.exe raised exception class EZeroDivide with message 'Floating point division by zero" what is cousing that ? or how to fix it ?

BTW: its in delphi 2006

Thanks for any suggestions.
Posted: 09/22/2006 12:01:36
by Ken Ivanov (EldoS Corp.)

You should check if value of Total parameter is non-zero before performing division operation:

if (Total <> 0) then
p := Round((Current*100)/Total)
p := 0;
Posted: 09/22/2006 12:24:58
by Strycek Vladimir (Basic support level)
Joined: 08/02/2006
Posts: 20

Many thaks, works like charm ;)



Topic viewed 2780 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!