English 中文(简体)
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 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 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.





相关问题
Data transfer via the system keyboard buffer? (VFP9)

Using a Visual FoxPro 9 executable file, (EXE), I need to be able to place data into the system keyboard buffer which is then to be picked up by another program, (non-FoxPro). I ve already tried using ...

iPhone ARMv6 VFP asm latency, throughput and hazards

in this document: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301g/DDI0301G_arm1176jzfs_r0p7_trm.pdf on page 21-25 (pdf page 875) the througput and latency timings are given for the assembly ...

Assembly: convert floatingpointvalue to signed byte

I currently try to write a program for the VFP unit of the iPhone using ARM assembly code. The VFP can do floatingpoint calculations, but AFAIK no integer arithmetic. However, it can convert a float ...

retrieve FoxPro 7.0 database schema

I need to obtain a list of tables in a Visual Fox Pro database. (7.0) This is what I m doing.... but it s not working or I m not doing it right... DataFactory dataFactory = new DataFactory(); ...

Corp IT Systems direction. Invest in A or B?

This is more of a general question about which direction would be a better investment for the company. Our company s core business application is written in Visual FoxPro and is about 9+ years old. ...

热门标签