次の方法で共有


レコードセットの切断および再接続

適用先: Access 2013、Office 2013

レコードセットを切断し、再接続する

ADO で見つかった最も強力な機能の 1 つは、データ ソースからクライアント側の Recordset を開き、データ ソースから Recordset を切断する機能です。 Once the Recordset has been disconnected, the connection to the data source can be closed, thereby releasing the resources on the server used to maintain it. You can continue to view and edit the data in the Recordset while it is disconnected and later reconnect to the data source and send your updates in batch mode.

Recordset を切断するには、カーソル位置 adUseClientRecordset を開き、ActiveConnection プロパティを Nothing と等しく設定します。 (C++ ユーザーは 、ActiveConnection を NULL に設定して切断する必要があります)。

切断された Recordset は、この章の後半で Recordset の保存について説明するときに使用します。この保存操作は、クライアント コンピューターがネットワークに接続されていないときに、アプリケーションが Recordset 内のデータを使用できるようにする必要がある場合に対処するためのものです。