Thursday, 5 September 2013

Error in operating on big database

Error in operating on big database

I am trying to delete rows of table by ID in .mdb file, however an
exception appears when working with big .mdb files (with size 35 MB or
more). Exception is "System resources exceeded (3035)".
But when working with small files there is no problem.
The connection is implemented by using CDaoDatabse, which represents a
connection to a database through which you can operate on the data. And
program is written in C++.
Piece of code is shown below:
CDaoDatabase* pDatabase
BeginTransaction(pDatabase);
try
{
sSQL.Format("Delete from %s where %s =
%d",DaoTrianglesTable,DaoObjectIdField,nObjectId);
pDatabase->Execute(sSQL);
}
catch(CDaoException* e)
{
DisplayDaoException(e);
EndTransaction(pDatabase,false);
}
EndTransaction(pDatabase,true);
Note that, if I delete functions BeginTransaction() and EndTransaction()
and run program then no problem. However, I am not sure that it is right
solution, is there any alternative solution of problem? May be someone
encountered such kind of case?

No comments:

Post a Comment