有这样一个语句:
if ADOTable1.Active
then ADOTable1.Close;
当程序走到这个句子的时候,ADOTable的状态是Active,State是dsBrowsing,
但是一旦操作then语句,就会弹出“can't perform this operation on a closed dataset。
这是为什么呢?
if ADOTable1.Active
then ADOTable1.Close;
当程序走到这个句子的时候,ADOTable的状态是Active,State是dsBrowsing,
但是一旦操作then语句,就会弹出“can't perform this operation on a closed dataset。
这是为什么呢?
ADOTable1.Acitve:=false;
ADOTable1.Close;
if adotable1.open then
adotable1.close;
你在form的onclose中写
ADOTable1.Close;dsInactive Dataset is closed, so its data is unavailable表示数据集目前在关闭状态!!dsInactive
先判断好象吃力不讨好。