Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 131
  • Last Modified:

data changes not posted

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.
0
TonyDelphiHunt
Asked:
TonyDelphiHunt
  • 2
1 Solution
 
TheRealLokiSenior DeveloperCommented:
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?
0
 
TonyDelphiHuntAuthor 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..
0
 
TheRealLokiSenior DeveloperCommented:
I think you should ask to have your points refunded actually :-)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now