 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
joshua Guest
|
Posted: Wed Dec 24, 2003 12:09 pm Post subject: paradox7 tables |
|
|
Hi all,
Could someone pliz help me with this code:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
DeleteData();
/*
DeleteData() is a function already defined.
*/
int a;
Table1->Open();
Table1->Active = true;
for (a=1; a<sg->RowCount; a++){
Table1->Edit();
Table1->Append();
Table1->FieldValues["Process_id"] =
"Process" + a; file://my problem lies here.
Table1->FieldValues["Amv"] = sg->Cells[1][a];
Table1->FieldValues["Smv"] = sg->Cells[2][a];
Table1->Post();
}
}
With the above code, i am aiming at filling my TTable component with data
obtained from a TStringGrid component(sg) At each button click, i should
delete all data in the Table1 and then refill it using fresh data from the
sg.
The field Process_id(defined as of Type Alpha - in a paradox table) should
read something lyk "Process 1", "Process 2"; going on and naming all
processes dependent on their number on the sg. So i implemented the line:
Table1->FieldValues["Process_id"] = "Process" + a;
My field Process_id is not giving the expected results!
First output line in the DBGrid component reads 'rocess'; second reads
'ocess'...
I cant seem to figure out where am messing up.
Any ideas pliz???
MERRY X-MAS TO YOU ALL.
joshua.
|
|
| Back to top |
|
 |
Don Locke Guest
|
Posted: Wed Dec 24, 2003 2:08 pm Post subject: Re: paradox7 tables |
|
|
Table1->FieldValues["Process_id"] =
"Process" + a; file://my problem lies here.
try:
Table1->FieldValues["Process_id"] = "Process" +IntToStr(a);
Merry Christmas
Don
|
|
| Back to top |
|
 |
joshua Guest
|
Posted: Sun Dec 28, 2003 1:08 pm Post subject: Re: paradox7 tables |
|
|
"> try:
| Quote: | Table1->FieldValues["Process_id"] = "Process" +IntToStr(a);
Merry Christmas
Don
|
thanx,
seems i was a bit myopic coz i ommited that IntToStr part.
thanx.
happy new year.
josh
|
|
| Back to top |
|
 |
|
|
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
|
|