| View previous topic :: View next topic |
| Author |
Message |
Dwayne Guest
|
Posted: Fri Apr 20, 2007 11:10 pm Post subject: Table Field Cycling. |
|
|
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
|
Posted: Wed Apr 25, 2007 11:27 pm Post subject: Re: Table Field Cycling. |
|
|
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
|
Posted: Fri Apr 27, 2007 2:40 am Post subject: Re: Table Field Cycling. |
|
|
Hello Jayme,
I am using Borland Builder 5 and Dbase for my files.
Dwayne |
|
| Back to top |
|
 |
Jayme Jeffman Guest
|
Posted: Fri May 11, 2007 8:51 pm Post subject: Re: Table Field Cycling. |
|
|
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
|
Posted: Mon May 14, 2007 5:30 pm Post subject: Re: Table Field Cycling. |
|
|
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
|
Posted: Tue May 15, 2007 2:29 am Post subject: Re: Table Field Cycling. |
|
|
| 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
|
Posted: Tue May 15, 2007 2:37 am Post subject: Re: Table Field Cycling. |
|
|
| 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
|
Posted: Thu May 17, 2007 7:28 pm Post subject: Re: Table Field Cycling. |
|
|
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
|
Posted: Tue May 22, 2007 1:10 am Post subject: Re: Table Field Cycling. |
|
|
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 |
|
 |
|