tags:

views:

23

answers:

1

hi,

I have a simple form with a grid where by the user enters data to save by a click event.Initially it worked well but after a while (and a few modifications later),when one hits the save button,it appears saved on the grid.But after closing the screen and re-opening,the data dosen't appear anymore.I tried looking at the tables and nothing although the recordid(autoinrement interger) has increased,no data is saved.Form data session proerty is set to private.Any help?

Thanks

Fred Kenya

+2  A: 

Several things you can double check. Are you using TABLEUPDATE() and verifying it returns true (.T.)? This is a common problem. Once you know it is failing you can use AERROR() to determine why.

IF TABLEUPDATE(.T., )
* All is well, nothing to do
ELSE
AERROR(laError)
* Message user and determine content of laError and how it failed.
ENDIF

Another common problem is not using the alias on the TABLEUPDATE(), which is the third parameter.

Because you see the data in the grid I will assume you have it bound correctly, but that definitely is another potential pitfall. Verify RecordSource of grid is correct and each column ControlSource is valid.

One other thing. If you are using a view and you have the view table in the data environment you might have the case of double buffering and you have to first update the view, then update the table.

Rick Schummer

Rick Schummer