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 

TDBLookUpListBox changes records when it shouldn't

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





PostPosted: Tue May 23, 2006 1:14 pm    Post subject: TDBLookUpListBox changes records when it shouldn't Reply with quote



Hello,

I have a TDBLookupListBox and a few DBEdit components that are all connected to the same table. If you make a change on one of the DBEdits and then move to a different record using the TDBLookupListBox it changes the record. Is there a way to prevent this? (I basically want to force the user to push a button for the changes to take place and not just by moving to another record)

Thanks

---Dave
Back to top
Minas
Guest





PostPosted: Tue May 23, 2006 3:14 pm    Post subject: Re: TDBLookUpListBox changes records when it shouldn't Reply with quote



"ashlar64" wrote
Quote:

If you make a change on one of the DBEdits and then move to a different
record using the TDBLookupListBox it changes the record.

This is the way TDBEdit works. Permits you directly edit your table

Quote:
Is there a way to prevent this?

use TEdits . But you have to provide manually the values

Edit1->Text = Table1->FieldByName("FLD_name")->AsString;

and to manually post the changes in a Button Click

Table1->Edit();
Table1->FieldByName("FLD_name")->AsVariant = Edit1->Text;
Table1->Post();

regards
_minas

------
"Only virtue's conquests have certainty" Sofokleous Erephyle
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) 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.