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 

TDBEdit doesn't show me its value

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





PostPosted: Sat Jan 03, 2004 12:38 am    Post subject: TDBEdit doesn't show me its value Reply with quote



I'm working with CB6, IB6 and Windows XP Home and want to work with two
tables of the same database in a TTabSheet of a TPageControl. So I placed
some DBEdit controls, a DBNavigator control and a DBGrid linked to the 1st
table into the TabSheet control. Then I put some DBEdit controls linked to
the 2nd table into that TabSheet control too.

Now I tried to synchronize both of the tables (table1 holds about 20.000 and
table2 about 4.500 records) through the reference in table1 (not indexed) to
the primary index of table2. Therefore I wrote an 'AfterScroll' message
handler for table1 and set a filter on table2 like this:

void __fastcall TForm1::Table1AfterScroll(TDataSet *DataSet)
{
AnsiString str = Table1->Fields->Fields[11]->AsString;
if (str != "")
{
Table2->Filter =
"FldName = '" + str + "'";
Table2->Filtered = true;
}
}

Now I run the program and I scrolled through the records of table1. But the
controls linked to table2 stay empty, whether there is a reference to table2
in the record of table1 or not.

I also did try to define a MasterSource from table2 to table1 with the same
unsuccessful result.
Where is the error???

Thanks in advance
Guido.



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.