Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Verifying / Repairing / Optimizing Tables
Fri, Nov 12 2010 4:43 AMPermanent Link

Mehmet Akturk

I have new to ElevateDB , but used DBISAM before.
In DBISAM we can handle the state of verfiying or repairing .
In elevate db how can I handle the verifying status ...

I have write some code like this ;

function Tf_maintenance.VerifyTable(VTableName :string):boolean;
begin

try
  Result := True;
  if (VTableName = '') then exit;

  with UDM.ChkQuery do
  begin
   Sql.Clear;
   Sql.Add ('VERIFY TABLE "'+VTableName+'"');
   Sql.Add ('STRUCTURE ONLY');
   ExecSql;
  end;
finally
 //...
end;

end;

Could you please give an example handling the status of verifying/Repiring/optimizing process ?
Or any opinion is welcome .

Thanks
Fri, Nov 12 2010 9:31 AMPermanent Link

Uli Becker

Mehmet,

> Could you please give an example handling the status of verifying/Repiring/optimizing process ?
> Or any opinion is welcome .

You can use Optimize and Repair in EDB. To show the progress just add
code to the OnProgress event handler of the query component:

Progressbar1.Position := PercentDone;

You should use a progressbar with step = 1 and max = 100.

In addition you can use the OnStatus event handler of the query to
display all status messages, e.g.:

Label1.caption := StatusMessage;

Regards Uli
Sat, Nov 13 2010 4:34 AMPermanent Link

Mehmet Akturk

Uli,

Thanks for the help.
How can find the list of status messages to localize them ?
I'm using Tsilang Component for localization.
I want to provide info to the user wheter the table is verified (repaired/optimez) or not.
Is there anyway to handle status as verified or not ?
If it is verified than I can create some messages that I can easily translate them.

Mehmet





Uli Becker wrote:

Mehmet,

> Could you please give an example handling the status of verifying/Repiring/optimizing process ?
> Or any opinion is welcome .

You can use Optimize and Repair in EDB. To show the progress just add
code to the OnProgress event handler of the query component:

Progressbar1.Position := PercentDone;

You should use a progressbar with step = 1 and max = 100.

In addition you can use the OnStatus event handler of the query to
display all status messages, e.g.:

Label1.caption := StatusMessage;

Regards Uli
Sat, Nov 13 2010 5:09 AMPermanent Link

Uli Becker

Mehmet,

> How can find the list of status messages to localize them ?

Have a look at edbconsts.pas. There you'll find everything you need.

> I want to provide info to the user wheter the table is verified (repaired/optimez) or not.
> Is there anyway to handle status as verified or not ?

AFAIK there is no verify function in EDB. (At least not yet.)

When repairing or optimzing a table, you'll get these status-messages:

{ Repair messages }

   EDB_REPAIRSTR_START = TEDBString('Repair of the %s %s started at %s');
   EDB_REPAIRSTR_TABLECORRUPT = TEDBString('The %s %s is corrupted (%s)');
   EDB_REPAIRSTR_ROWCORRUPT = TEDBString('The row %s is corrupted and
has been removed (%s)');
   EDB_REPAIRSTR_CONSTRAINTS = TEDBString('Checking constraints');
   EDB_REPAIRSTR_ROWERROR = TEDBString('The repair could not complete
due to an '+
                                       'error with the row %s (%s)');
   EDB_REPAIRSTR_END = TEDBString('Repair of the %s %s ended at %s');

   { Optimization messages }

   EDB_OPTIMIZESTR_START = TEDBString('Optimization of the %s %s
started at %s');
   EDB_OPTIMIZESTR_CONSTRAINTS = TEDBString('Checking constraints');
   EDB_OPTIMIZESTR_ROWERROR = TEDBString('The optimization could not
complete due to an '+
                                         'error with the row %s (%s)');
   EDB_OPTIMIZESTR_END = TEDBString('Optimization of the %s %s ended at
%s');

To determine the success of an action, look also at these status
messages in the same unit:

{ Status messages }

   EDB_STATUSSTR_START = TEDBString('%s the %s %s...');
   EDB_STATUSSTR_ABORT = TEDBString('The %s of the %s %s did not
complete');
   EDB_STATUSSTR_END = TEDBString('The %s %s was %s successfully');

Hope that helps.

Uli
Sat, Nov 13 2010 9:45 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< AFAIK there is no verify function in EDB. (At least not yet.) >>

2.04 includes a VERIFY TABLE statement, and there's a bunch of new status
messages in edbconsts.pas that reflect the more granular nature of the
repair/verify functionality in 2.04.

--
Tim Young
Elevate Software
www.elevatesoft.com
Sat, Nov 13 2010 11:11 AMPermanent Link

Uli Becker

Tim,

> 2.04 includes a VERIFY TABLE statement, and there's a bunch of new
> status messages in edbconsts.pas that reflect the more granular nature
> of the repair/verify functionality in 2.04.

Thanks. Actually I am still sticking to 2.03 because of the breaking
changes. That's why I didn't know the statement.

Regards Uli
Image