在数据模块的OnCreate事件中,设置数据库连接串、激活数据集,手工完成初始化工作:procedure TDMMain.DataModuleCreate(Sender: TObject);
begin
adoCon.ConnectionString := ADO_STRING;
adtBook.Active := True; //此行提示出错!
adtPub.Active := True;
end;Debugger Exception Notification:
Project BOOK.exe raised exception class EOleException with message '对象打开时,不允许操作。'.Process stopped.Use Step or Run to continue.
View CPU Window
请各位大虾来帮忙解决一下!小弟在此谢谢了!
begin
adoCon.ConnectionString := ADO_STRING;
adtBook.Active := True; //此行提示出错!
adtPub.Active := True;
end;Debugger Exception Notification:
Project BOOK.exe raised exception class EOleException with message '对象打开时,不允许操作。'.Process stopped.Use Step or Run to continue.
View CPU Window
请各位大虾来帮忙解决一下!小弟在此谢谢了!
connection.close;
connection.open;