| View previous topic :: View next topic |
| Author |
Message |
Rick Hillier Guest
|
Posted: Fri Apr 02, 2004 5:55 pm Post subject: Paradox Table Copy (While Open)? |
|
|
Greetings,
Does anyone know of any code libraries or components that would allow me to
make an exact copy of a Paradox table, even if it is open by other
processes? This is for a custom backup utility that I am making for one of
my apps.
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Fri Apr 02, 2004 10:26 pm Post subject: Re: Paradox Table Copy (While Open)? |
|
|
There is no way to copy a Paradox table while it is open without the
possibility of getting a corrupt copy.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Sat Apr 03, 2004 4:31 pm Post subject: Re: Paradox Table Copy (While Open)? |
|
|
Rick,
why not use the TBatchMove component?
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
"Rick Hillier" <rhillier (AT) swconnection (DOT) com> wrote
| Quote: | Greetings,
Does anyone know of any code libraries or components that would allow me
to
make an exact copy of a Paradox table, even if it is open by other
processes? This is for a custom backup utility that I am making for one
of
my apps.
Rick
|
|
|
| Back to top |
|
 |
Bill Todd (TeamB) Guest
|
Posted: Sat Apr 03, 2004 4:49 pm Post subject: Re: Paradox Table Copy (While Open)? |
|
|
On Sat, 3 Apr 2004 19:31:12 +0300, "Mike Shkolnik"
<mshkolnik2002 (AT) ukr (DOT) net> wrote:
| Quote: | why not use the TBatchMove component?
|
BatchMove is fine if all that is needed is a copy of the data.
BatchMove does not copy the table. Copying the table implies copying
indices etc. so that the copy has all of the features of the original
table.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
| Back to top |
|
 |
Rick Hillier Guest
|
Posted: Mon Apr 05, 2004 8:12 pm Post subject: Re: Paradox Table Copy (While Open)? |
|
|
I was thinking that something that would simplify the equivalent of doing a
"borrow" with all check boxes checked (as in DBD) and then doing a record by
record transfer of the data using functions in the BDE. The catch is that
tables with AutoIncrement values would need to have those values preserved.
Perhaps all I can do is simply copy the appropriate files and do an
integrity check on them with several retries before reporting a failure.
<Sigh>
"Bill Todd (TeamB)" <no (AT) no (DOT) com> wrote
| Quote: | On Sat, 3 Apr 2004 19:31:12 +0300, "Mike Shkolnik"
[email]mshkolnik2002 (AT) ukr (DOT) net[/email]> wrote:
why not use the TBatchMove component?
BatchMove is fine if all that is needed is a copy of the data.
BatchMove does not copy the table. Copying the table implies copying
indices etc. so that the copy has all of the features of the original
table.
--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
|
|
|
| Back to top |
|
 |
Dell Stinnett Guest
|
Posted: Mon Apr 12, 2004 1:53 pm Post subject: Re: Paradox Table Copy (While Open)? |
|
|
Rick, it's not that difficult to copy the table structure in Delphi -
including the indexes. You use the FieldDefs and IndexDefs of the original
table. It works something like this:
tblCopyFrom.Open;
tblCopyTo.TableName := 'c:backupMyTable.db';
tblCopyTo.IndexDefs.Assign(tblCopyFrom.IndexDefs);
tblCopyTo.FieldDefs.Assign(tblCopyFrom.FieldDefs);
tblCopyTo.CreateTable;
tblCopyTo.Open;
You can then use BatchMove to copy the data from the original table.
-Dell
|
|
| Back to top |
|
 |
Olivier Beltrami Guest
|
Posted: Tue Apr 13, 2004 11:19 am Post subject: Re: Paradox Table Copy (While Open)? |
|
|
| Quote: | Rick, it's not that difficult to copy the table structure in Delphi -
including the indexes. You use the FieldDefs and IndexDefs of the
original
table. It works something like this:
|
You should probably copy the data just before you apply the indices.
Olivier
|
|
| Back to top |
|
 |
Dell Stinnett Guest
|
Posted: Tue Apr 13, 2004 7:55 pm Post subject: Re: Paradox Table Copy (While Open)? |
|
|
"Olivier Beltrami" <obeltrami at wanadoo dot fr> wrote
| Quote: | You should probably copy the data just before you apply the indices.
|
If, as Rick states, this is a "Backup", there shouldn't be any problem with
the indexes. Also, in order to create the indexes when the table is
created, they have to be there before the data is - when the call to
..CreateTable is made.
-Dell
|
|
| Back to top |
|
 |
|