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 

Table Field Cycling.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Dwayne
Guest





PostPosted: Fri Apr 20, 2007 11:10 pm    Post subject: Table Field Cycling. Reply with quote



Since BatchMove is failing miserably on my large file, I am going to have
to transfer my data one record at a time.

My question is this:

Is there a way to cycle through all the different fields in a record?

for example (Psuedo code here ).

Table1
Table2
while(!Table1->Eof)
{
c=Table1->FieldCount.
while(c>=1)
{
Table2.Field(c)=Table1.Field(c);
c++;
}
Table2->Post();
Table1->Next();
}


Thanks

Dwayne
Back to top
Jayme Jeffman
Guest





PostPosted: Wed Apr 25, 2007 11:27 pm    Post subject: Re: Table Field Cycling. Reply with quote



Hello,

What database are you using ? Oracle ?
If so there is a solution through a SQL command.

Jayme.


"Dwayne" <myfrienddr (AT) yahoo (DOT) com> escreveu na mensagem
news:462901d9$1 (AT) newsgroups (DOT) borland.com...
Quote:
Since BatchMove is failing miserably on my large file, I am going to have
to transfer my data one record at a time.

My question is this:

Is there a way to cycle through all the different fields in a record?

for example (Psuedo code here ).

Table1
Table2
while(!Table1->Eof)
{
c=Table1->FieldCount.
while(c>=1)
{
Table2.Field(c)=Table1.Field(c);
c++;
}
Table2->Post();
Table1->Next();
}


Thanks

Dwayne
Back to top
Dwayne
Guest





PostPosted: Fri Apr 27, 2007 2:40 am    Post subject: Re: Table Field Cycling. Reply with quote



Hello Jayme,

I am using Borland Builder 5 and Dbase for my files.

Dwayne
Back to top
Jayme Jeffman
Guest





PostPosted: Fri May 11, 2007 8:51 pm    Post subject: Re: Table Field Cycling. Reply with quote

I am very sorry. The solution trhough SQL uses a
non ANSI syntax.

Jayme.

"Dwayne" <myfrienddr (AT) yahoo (DOT) com> escreveu na mensagem
news:46311c34$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hello Jayme,

I am using Borland Builder 5 and Dbase for my files.

Dwayne
Back to top
Jayme Jeffman
Guest





PostPosted: Mon May 14, 2007 5:30 pm    Post subject: Re: Table Field Cycling. Reply with quote

Have a look at "TBatchMove" in the C++Builder Help file.

HTH

Jayme.

"Dwayne" <myfrienddr (AT) yahoo (DOT) com> escreveu na mensagem
news:46311c34$1 (AT) newsgroups (DOT) borland.com...
Quote:
Hello Jayme,

I am using Borland Builder 5 and Dbase for my files.

Dwayne
Back to top
Antonio Felix
Guest





PostPosted: Tue May 15, 2007 2:29 am    Post subject: Re: Table Field Cycling. Reply with quote

Quote:
Have a look at "TBatchMove" in the C++Builder Help file.

Hi Jayme

That's the reaon for the question

<Quote>
Since BatchMove is failing miserably on my large file, I am going to have
to transfer my data one record at a time.
</Quote>

;-)
Back to top
Antonio Felix
Guest





PostPosted: Tue May 15, 2007 2:37 am    Post subject: Re: Table Field Cycling. Reply with quote

Quote:
for example (Psuedo code here ).

Table1
Table2
while(!Table1->Eof)
{
c=Table1->FieldCount.
while(c>=1)
{
Table2.Field(c)=Table1.Field(c);
c++;
}
Table2->Post();
Table1->Next();
}


I don't know if you've already solved your problem ?

Assuming the tables share the same structure you will be able to use the
pseudo code above.

something like (untested)

for ( int i = 0; i < Table1->FieldCount; i++ )
Table2->Fields->Fields[i] ->Assign(Table1->Fields->Fields[i]);

inside the table looping / Posting

HTH
Antonio
Back to top
Jayme Jeffman
Guest





PostPosted: Thu May 17, 2007 7:28 pm    Post subject: Re: Table Field Cycling. Reply with quote

I'm sorry.
:-|

Jayme.

"Antonio Felix" <antoniojfelix (AT) maisspamnao (DOT) clixempt> escreveu na mensagem
news:4648d455$1 (AT) newsgroups (DOT) borland.com...
Quote:
Have a look at "TBatchMove" in the C++Builder Help file.

Hi Jayme

That's the reaon for the question

Quote
Since BatchMove is failing miserably on my large file, I am going to have
to transfer my data one record at a time.
/Quote

;-)
Back to top
Dwayne
Guest





PostPosted: Tue May 22, 2007 1:10 am    Post subject: Re: Table Field Cycling. Reply with quote

I don't know if you've already solved your problem ?

Assuming the tables share the same structure you will be able to use the
pseudo code above.

something like (untested)

for ( int i = 0; i < Table1->FieldCount; i++ )
Table2->Fields->Fields[i] ->Assign(Table1->Fields->Fields[i]);

inside the table looping / Posting

Hello Antonio!

Long time no see!.. It is great to see and hear from you...

No, I have not solved my problem yet... I will attempt your way of doing
it.
I have used the Batch method for years, but I think it is limited on file
size, or Record numbers. it stopped working on me. So, I was working on
figuring a run-around way to solve my problem.

I have company records back to 1996, and they want to keep them... Right
now, I split up the files using Dbase (manually) and shrunk the later data
to make it work.

Dwayne
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder 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.