Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QODBC slow connection to an open MS Access file
I'm working with an MS Access file (.accdb) using QODBC driver. The file is located in a shared folder so that a lot of users can open it simultaneously. My program works fine and the connection is quite fast until someone opens that file. If that .accdb file is open on someone's computer my program starts working very slow especially considering the volume of the database (over 20 columns and 3000 rows). I've tried to connect to that file using native Windows methods (like DAO, ADO, etc) and in those cases, I don't hurdle such performance issues. I could use the Windows native mean of database connections but it would take a lot of effort and time to do that. Moreover, it'd be better to use native Qt's database connection means because they allow to quite easy use database with models and views.
Have anyone faced such problems? Are there any ways to solve that issue?
Are there any ways to solve that issue?
Blame the MS Access ODBC driver :)
Oh yeah, I've already done this a lot of times!
Unfortunately, I can't refuse to use MS Access. It seems to me I should learn bare C++ ODBC API.
It seems to me I should learn bare C++ ODBC API.
I don't understand this - how should this help you when you use ODBC when the Qt ODBC driver is using the exact same ODBC API?
Well, my experience shows that when I use native Microsoft means of connection to a database, it works better than QODBC. But to tell the truth, I've tried only DAO, ADO, and OLE DB. Should try ODBC either to figure it out.
QODBC is just a wrapper around the ODBC API - so I don't expect that it magically works faster in your case then.