MAINFORM中的TABLE1的ACTIVE=TRUE了,还需要TABLE1.OPEN吗?

解决方案 »

  1.   

    先把TABLE置为EDIT状态。不过最好不要使用DBEDIT这样的数据库敏感控件来编辑数据。
      

  2.   

    我试了一下,没有出现你所的情况。你出现的错误提示是什么?
     建议你在 mainform.table1.post 前加上一个判断:
     if mainform.Table1.State in [dsInsert,dsEdit] then
         mainForm.table1.post
    在 AAA 窗体的 uses 中加入 db;
      

  3.   

    最好在button的click事件中写
    table1.append;
    if aaa.showmodal=mrok then table1.post
    else table1.cancel;