code analysis to check Recordset.Close()
Hello,
We have a legacy code base written in c++. we noticed that in some part of our code, a recordset is created but the Close() method is not called. In some situation, this lead to crash.
Is there a way to check that a method is called (Close()) in the same method of the recordset creation ?
we have 2000 recordset creation, so if we need to go through the source code manual, it will be very time consuming.
regards
sebastien
Please sign in to leave a comment.
Hello Sebastien,
You could write an R# plugin, but that would be probably time-consuming too if you haven't tried doing that before.
One approach that might help you is this. Run find usages twice for Recordset's constructor and Close. Group the results by type and member. Export the results to a text file and then check the diff between the files. That should tell you if there are some functions that do not have a Close call inside them.
Not related, but I wonder why you can't call Close automatically from Recordset's destructor?
Thank you i will give this a try