Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread TEDBScript progress
Wed, Nov 25 2009 7:11 AMPermanent Link

Peter
Hello

I have reverse engineered a large database (>140 tables), and would like to show the user a progress bar. I use the DevEx progressbar, and it
has a Marquee effect that doesn't rely on positions, so it would appear to be ideal. The following runs the script...

 DMC.EDBScript1.OnProgress   := MigrationProgress;
 DMC.EDBScript1.DatabaseName := EDB_DBNAME;
 DMC.EDBScript1.SQL.Clear;
 DMC.EDBScript1.SQL.LoadFromFile(IncludeTrailingPathDelimiter(ExtractFilePath(Application.ExeName)) +
                                                                'NewDatabase.SQL');
 DMC.EDBScript1.ExecScript;

...and the following is the MigrationProgress method...
cxPgbTbl.Position := PercentDone;
//cxPgbTbl.Visible := True;
cxPgbTbl.Properties.Marquee := True;
Application.ProcessMessages;

Despite the fact that I don't expect the position value to be useful, I found that it is only fired twice during the lengthy process - at the beginning
and the end.

Have I missed something or is the script not capable of providing progress?

Regards

Peter
Wed, Nov 25 2009 7:17 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Peter,

<< Have I missed something or is the script not capable of providing
progress? >>

You have to provide the progress by using the SET PROGRESS statement:

http://www.elevatesoft.com/manual?action=mantopic&id=edb2sql&category=13&topic=250

The progress from the statements executed *in* the script does not surface
for the script progress itself.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image