これが問題かどうかはわかりませんが、すべてのレコードセットと接続が常に閉じられているわけではない可能性があります...過去に同様の問題が発生したとき、次のルーチンで終了しました.. (これは単なるスニペットであることに注意してください1 つのレコードセットを閉じると、実際の手順では、実際に 15 の異なるレコードセットを調べて、それらを閉じる必要があるかどうかを確認します.. )。
modCloseObjects () プロシージャは、ページの最後、リダイレクトの前、エラー処理内などで常に呼び出されます...
' subroutine will close and set the objects to Nothing. '
' Close Recordsets and then the Connection '
sub modCloseObjects()
'Close the record sets one by one '
If ucase(TypeName(oRS)) = "RECORDSET" then
if oRS.state <> adStateClosed then
oRS.close
Set oRS = Nothing
end if
end if
' if you have other recordSet objects, add them to the rourtine here: '
' Close the connection '
If ucase(TypeName(objConn)) = "CONNECTION" then
if objConn.state <> adStateClosed then
objConn.close
Set objConn = Nothing
end if
end if
end sub
adovbs.inc がない場合は、次の定数も必要になります。
Const adStateClosed = &H00000000