三层的数据库为什么添加老是添加不进去。
fm_data.Cd_borrow.Insert;
fm_data.Cd_borrow.fieldbyname('cardNo').AsString:=edit1.Text;
fm_data.Cd_borrow.FieldByName('bookNo').AsString:=edit2.Text;
fm_data.Cd_borrow.FieldByName('borrowdate').AsDateTime:=date;
try
fm_data.cd_borrow.Post;
fm_data.Cd_borrow.ApplyUpdates(0);
showmessage('图书证办理成功');
except
showmessage('图书证办理失败');
end;
为什么出现希望大家帮帮忙——
到底是什么原因呢。。
fm_data.Cd_borrow.Insert;
fm_data.Cd_borrow.fieldbyname('cardNo').AsString:=edit1.Text;
fm_data.Cd_borrow.FieldByName('bookNo').AsString:=edit2.Text;
fm_data.Cd_borrow.FieldByName('borrowdate').AsDateTime:=date;
try
fm_data.cd_borrow.Post;
fm_data.Cd_borrow.ApplyUpdates(0);
showmessage('图书证办理成功');
except
showmessage('图书证办理失败');
end;
为什么出现希望大家帮帮忙——
到底是什么原因呢。。
如果只插入一个字段就没事
fm_data.Cd_borrow.Insert;
fm_data.Cd_borrow.fieldbyname('cardNo').AsString:=edit1.Text;
fm_data.cd_borrow.Post;
fm_data.Cd_borrow.ApplyUpdates(0);
插入2个。字段就出现错误。这是为什么呢。。提示还是SQL 插入问题。
我就是搞不明白呢!