Link to home
Start Free TrialLog in
Avatar of sinister
sinister

asked on

Memory and handle problems with CDatabase

Greetings,

my program uses CDatabase and CRecordset objects in multiple threads and very frequently. The problem is that memory doesn't seem to be released when I close the database. I do see memory decreasing when I close my recordset objects but not the database.
Also, everytime I call CDatabase->ExecuteSQL for an INSERT query the memory and handle count goes up. Is there some other mehod that has to be called to release resources. Note that I am using CDatabase to connect to a MS Access database via ODBC because it is more thread safe that CDaoDatabase.

Thanks.
Avatar of Nicolay_Ch
Nicolay_Ch

May be you need to simple call CDaoDatabase->Close()?

Before CRecordset->Close()?

ASKER CERTIFIED SOLUTION
Avatar of alechko
alechko

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sinister

ASKER

Well, so far our stress testing seems to be going well, I keep the database open all the time. Is there a timeout without the connection that I should be concerned with? Also, if you know of any potential problems that can occur with MS Access through ODBC and CDatabase, I would appreciate it.

Thanks.
I don't think, I cant see any reason that Access database will not respond, maybe if someone deletes it ?!

Problems... can't think of something...
As far as I know there are some limits of Access database comparing to SQL Server, like the size, number of tables, security... and the most problematic is the speed and number of connections at the same time.

CDatabase & CRecordset works just fine.

Have fun.
I don't think, I cant see any reason that Access database will not respond, maybe if someone deletes it ?!

Problems... can't think of something...
As far as I know there are some limits of Access database comparing to SQL Server, like the size, number of tables, security... and the most problematic is the speed and number of connections at the same time.

CDatabase & CRecordset works just fine.

Have fun.