开发者

Data appears on the grid in a form but is not saved on the table in Visual FoxPro 9

I have a simple form with a grid where by the user enters data to save by a c开发者_StackOverflowlick 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 doesn't appear any more. I tried looking at the tables and nothing although the recordid (autoincrement integer) has increased, no data is saved. Form data session proerty is set to private. Any help?

Thanks

Fred Kenya


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


I suggest you check the buffer mode on your form, this problem might be caused by the buffering mode in the data environment or the form itself.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜