| View previous topic :: View next topic |
| Author |
Message |
Qimiao Lu Guest
|
Posted: Fri Jul 30, 2004 2:16 pm Post subject: How to quickly delete a bunch of records from Table? |
|
|
Hi,
Does anyone know how to remove the selected records (more than one ) from a
table quickly? Right now, I am using TTable->Delete to delete each selected
record through loop. It is very slow. Thanks in advance.
Regards.
Qimiao
|
|
| Back to top |
|
 |
Jim Faulkner Guest
|
Posted: Thu Aug 05, 2004 7:33 pm Post subject: Re: How to quickly delete a bunch of records from Table? |
|
|
Turn off auto-commits and commit after you delete the records.
"Qimiao Lu" <qlu (AT) baird (DOT) com> wrote
| Quote: | Hi,
Does anyone know how to remove the selected records (more than one ) from
a
table quickly? Right now, I am using TTable->Delete to delete each
selected
record through loop. It is very slow. Thanks in advance.
Regards.
Qimiao
|
|
|
| Back to top |
|
 |
Qimiao Lu Guest
|
Posted: Mon Aug 09, 2004 1:10 pm Post subject: Re: How to quickly delete a bunch of records from Table? |
|
|
Thanks. How to turn off auto-commits? I could not find any property and
method relating to Auto-commits. Do you mean to use the block like this:
StartTransaction
delete all records;
Commit
Thanks again
Qimiao
"Jim Faulkner" <jim.faulkner (AT) bocc (DOT) citrus.fl.us> wrote
| Quote: | Turn off auto-commits and commit after you delete the records.
"Qimiao Lu" <qlu (AT) baird (DOT) com> wrote in message
news:410a5849$1 (AT) newsgroups (DOT) borland.com...
Hi,
Does anyone know how to remove the selected records (more than one )
from
a
table quickly? Right now, I am using TTable->Delete to delete each
selected
record through loop. It is very slow. Thanks in advance.
Regards.
Qimiao
|
|
|
| Back to top |
|
 |
Jim Faulkner Guest
|
Posted: Mon Aug 09, 2004 2:47 pm Post subject: Re: How to quickly delete a bunch of records from Table? |
|
|
Basically, yes -- but it really all depends on the RDBMS that you are using
and which data controls --
"Qimiao Lu" <qlu (AT) baird (DOT) com> wrote
| Quote: | Thanks. How to turn off auto-commits? I could not find any property and
method relating to Auto-commits. Do you mean to use the block like this:
StartTransaction
delete all records;
Commit
Thanks again
Qimiao
"Jim Faulkner" <jim.faulkner (AT) bocc (DOT) citrus.fl.us> wrote in message
news:41128b8f$1 (AT) newsgroups (DOT) borland.com...
Turn off auto-commits and commit after you delete the records.
"Qimiao Lu" <qlu (AT) baird (DOT) com> wrote in message
news:410a5849$1 (AT) newsgroups (DOT) borland.com...
Hi,
Does anyone know how to remove the selected records (more than one )
from
a
table quickly? Right now, I am using TTable->Delete to delete each
selected
record through loop. It is very slow. Thanks in advance.
Regards.
Qimiao
|
|
|
| Back to top |
|
 |
dcent Guest
|
Posted: Sun Aug 29, 2004 7:47 pm Post subject: Re: How to quickly delete a bunch of records from Table? |
|
|
Use a TQuery. Set the SQL property to some like:
DELETE * FROM table_name WHERE LastUpdate < '01/01/1999'
Qimiao Lu wrote:
| Quote: | Hi,
Does anyone know how to remove the selected records (more than one ) from a
table quickly? Right now, I am using TTable->Delete to delete each selected
record through loop. It is very slow. Thanks in advance.
Regards.
Qimiao
|
|
|
| Back to top |
|
 |
|