data changes not posted

TonyDelphiHunt
TonyDelphiHunt used Ask the Experts™
on
I have a simple app which has several tdbedit fields and a button to post data.

If I edit a field and press the post button before I tab out of the field, the data is lost.

This sounds SO trivial I'm embarrassed to ask but there you go..
I'm asking.............. What can I do.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Developer
Commented:
what database components are you using? ado, paradox (TTable, TQuery, TIBQuery, TIBDataset, TUpdateSQL, etc)
if it is sql, what does your updatesql look like?
are you usig the default settings, or have you turned on caching?

Author

Commented:
Well, what can I say...... I was looking at a tiny sample of code to show the problem and I couldn't re-produce it.......................................

After much anguish, I found it was because in the original code I was triggering the Post with a tToolButton. My sample code was using a standard button.

When the tToolButton is pressed, focus is left with the tDBEdit that has focus, with a tButton, focus is passed to the button itself.
When the focus leaves the tdbedit, data is retained.


Weird behavior but logical (I guess). Anyway, please have the points as you were the only one to answer anyway.


Best Wishes..
TheRealLokiSenior Developer

Commented:
I think you should ask to have your points refunded actually :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial