BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Paradox Table Copy (While Open)?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop)
View previous topic :: View next topic  
Author Message
Rick Hillier
Guest





PostPosted: Fri Apr 02, 2004 5:55 pm    Post subject: Paradox Table Copy (While Open)? Reply with 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.

Quote:
Rick



Back to top
Bill Todd (TeamB)
Guest





PostPosted: Fri Apr 02, 2004 10:26 pm    Post subject: Re: Paradox Table Copy (While Open)? Reply with quote



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





PostPosted: Sat Apr 03, 2004 4:31 pm    Post subject: Re: Paradox Table Copy (While Open)? Reply with quote



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





PostPosted: Sat Apr 03, 2004 4:49 pm    Post subject: Re: Paradox Table Copy (While Open)? Reply with quote

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





PostPosted: Mon Apr 05, 2004 8:12 pm    Post subject: Re: Paradox Table Copy (While Open)? Reply with quote

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>

Quote:
Rick

"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





PostPosted: Mon Apr 12, 2004 1:53 pm    Post subject: Re: Paradox Table Copy (While Open)? Reply with 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:

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





PostPosted: Tue Apr 13, 2004 11:19 am    Post subject: Re: Paradox Table Copy (While Open)? Reply with quote

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





PostPosted: Tue Apr 13, 2004 7:55 pm    Post subject: Re: Paradox Table Copy (While Open)? Reply with quote

"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Desktop) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.