Solved

data changes not posted

Posted on 2006-10-19
3
124 Views
Last Modified: 2010-04-05
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
Comment
Question by:TonyDelphiHunt
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
TheRealLoki earned 100 total points
Comment Utility
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
 

Author Comment

by:TonyDelphiHunt
Comment Utility
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
 
LVL 17

Expert Comment

by:TheRealLoki
Comment Utility
I think you should ask to have your points refunded actually :-)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now