又一个问题:!!
我建的数窗对象d_person,是关于人员数据的,其中有一列名为depart_id的,是表的外键,它存放的是人员所在部门的编号(对应具体部门名称depart_name的)——是表department的主键。现在我根据表departmet做了一个名为dddw_department的数窗对象,我在d_person中的depart_id列中使之编辑风格为dropdowndatawindow,引用的的就是dddw_department,显示depart_name,数据项为depart_id.
当我运行程序,往数窗中添加数据,保存的时候,却出现:SQLSTATE = 23000
[Sybase][ODBC Driver][Adaptive Server Anywhere]Integrity constraint violation: Column 'dept_id' in table 'personnel' cannot be NULL
No changes made to database.
。。。。。请问这是怎么个回事,为什么数据没能写入表中