 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Gabriel Ballesteros Guest
|
Posted: Tue Feb 24, 2004 5:14 pm Post subject: Slow performance with TADOTable.Post |
|
|
Hello,
I'm developing any application with Delphi5 and MySQL 4,0,15 maxdebug. I'm
use MySQL ODCB 3.51.06 with ADO components to connect MySQL .
I have the following piece of code :
AdoTable1.Open;
while not AdoTable1.Eof do
begin
AdoTable1.Edit;
AdoTable1.FieldByName('salary').AsFloat:=Table1.FieldByName('salary').AsFloa
t *
1.5;
AdoTable1.Post; // Here exists slow performance.
AdoTable1.Next;
end;
AdoTable1.Close;
The problem is that when invoking the edit and post methods the application
present slow peformance.
The same piece of code using TTable(BDE) executing with high performance.
The table having 3000 records and having defined primary key in the
indexname property.
Excuse me for my English.
Gabriel Ballesteros
Medellín - Colombia
|
|
| Back to top |
|
 |
Gabriel Ballesteros Guest
|
Posted: Thu Feb 26, 2004 4:43 pm Post subject: Re: Slow performance with TADOTable.Post |
|
|
I try with the method disablecontrols but the performance continues being
the same one
"Brian Bushay TeamB" <BBushay (AT) Nmpls (DOT) com> escribió en el mensaje
news:i5vn30tsifkgufeg1cb2kerskgs20odnv2 (AT) 4ax (DOT) com...
| Quote: |
while not AdoTable1.Eof do
begin
AdoTable1.Edit;
AdoTable1.FieldByName('salary').AsFloat:=Table1.FieldByName('salary').AsFlo
a
t *
1.5;
AdoTable1.Post; // Here exists slow performance.
AdoTable1.Next;
end;
You will pickup some speed using disblecontrols
with AdoTable1 do Try
disableControls;
Open;
while not Eof do begin
Edit;
FieldByName('salary').AsFloat:=Table1.FieldByName('salary').AsFloat
*1.5;
Post; // Here exists slow performance.
Next;
end;//while
Close;
finally
EnableControls
end;//try
--
Brian Bushay (TeamB)
[email]Bbushay (AT) NMPLS (DOT) com[/email]
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|