Slow execution of queries on a Microsoft Access database via ADO .Net

I am reimplementing a C++ layer into a C# layer at my company. SQL queries are executed in the layer on a Microsoft Access database via an ODBC datasource. The database is a .mdb file and the ODBC datasource uses the following driver : Microsoft Access Driver (*.mdb).

The C++ layer uses the Windows ODBC API to execute SQL queries via the ODBC datasource. For instance the SQLExecDirect function is called to execute a SQL query.

The C# layer uses the ADO .Net OdbcConnection class to execute SQL queries via the ODBC datasource.

The execution of several SQL queries takes less than 1 minute when using the C++ layer. The execution of the same SQL queries takes approximatively 20 minutes when using the C# layer. Does anyone know why the execution is slower when using the C# layer ?

Any help will be greatly appreciated

Answers


I have found why the execution of queries was slow when using the C# layer. I forgot to dispose the IDbCommand objects.


Need Your Help

how can i inherit from 2 objects and use both the objects as a prototype of another

javascript prototype

I am learning js inheritance and prototyping and my naming is probably totally off i am sorry for that.

UITableView Lags Due a Particular Object

uitableview lag reusability uiswitch

In the Home Page of my App, I have an iCarousel object that scrolls images. Under that there is a UITableView - the table view is where the problem is.