当前位置: 代码迷 >> PB >> 保存数据异常
  详细解决方案

保存数据异常

热度:89   发布时间:2016-04-29 06:33:45.0
保存数据错误
我在程序运行中,添加数据时,老是出现这样的错误:
我的pnum列为计划编号,可是我已经输入了编号,为什么在保存数据的时候,仍给我提示这样的错误啊。

------解决方案--------------------
加个messagebox()看下呢
------解决方案--------------------
错误提示是PNUM为空了,而该列不允许为空。
在update()之前先dw_1.AcceptText()一下

Applies the contents of the DataWindow's edit control to the current item in the buffer of a DataWindow control or DataStore. The data in the edit control must pass the validation rule for the column before it can be stored in the item.

------解决方案--------------------
debug 一下 看下保存钱 pnum有没有值?
------解决方案--------------------
是否数据窗口的update属性没有选择PNUM?
  相关解决方案