in Education by
I'm using excel vba to pull data from a MS Access DB - this is using Excel 2013 and Access 2013 32bit. The code historically has used: Provider=Microsoft.Jet.OLEDB.4.0; However some computers have upgraded to Excel 2016 64bit and the Jet provider is not available for 64bit. I have changed the code to: Provider=Microsoft.ACE.OLEDB.12.0; which works for both 64bit and 32bit systems. However, I have noticed a significant speed drop in loading/saving data just from changing this line. Does anyone know why this can be and how I can improve it? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You are correct in having to choose the ACE provider for x64 bits. And the big advantage of JET was it was (and still is) installed on all copies of windows by default. So no need to install Access or the runtime, or previous the office connectivity package. As for performance? There has been a few comments about performance in regards to ACE x64. However, one trick or suggestion is to ensure that the connection stays open. In other words, are you sure the row processing is going slow, or it is the overall time? (perhaps put a test msg box, or test in your code. Eg: Dim T as single T = timer() ‘ your code here Debug.print timer() – t The above will thus spit out the time to the debug window (while in VBA ide hit ctrl-g to display the immediate/debug window. The reason why I suggest force open idea is often you find that ACE takes a VERY long time to open. But once open then the data reading has good performance (same as before). So, I suggest to check and try this fix. So open a table (any table) and KEEP it open. Now run your existing code (that may well open + close other tables). The issue is when ACE attempts to open a table, it tries to put locks on the mdb/accdb file and it is this process that takes VERY VERY long time. However, if you force (keep) open one table, then this VERY slow process of ACE attempting to lock the file for read/write does not occur each time you execute a query, or create additional recordsets in code. So, if the row reading speed is fast, but the time to START + open is very slow, then before you run + test your routines, force open a table to some reocrdset (keep it active and in scope), and THEN try your code. I find 9 out of 10 times, this results in elimination of this slow speed, and often I seen the results are nothing short of spectacular (it will run faster then before!!!)

Related questions

0 votes
    I am setting up a VBA userform function for my work that shows available quantities left to order based on ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I have a master spreadsheet that analyzes records from another spreadsheet with rows going all the way up to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 19, 2022 in Education by JackTerrance
0 votes
    I want to using sumifs function in VBA. And result paste in same column as previous data. JavaScript ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    I am receiving the error "'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine" ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    In Ms Access Which query allow to create a table or alter data or database? Select the correct answer from above options...
asked Dec 17, 2021 in Education by JackTerrance
0 votes
    I am running following PHP code to interact with a MS Access database. $odbc_con = new COM("ADODB. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I am running following PHP code to interact with a MS Access database. $odbc_con = new COM("ADODB. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    For a report in MS Access (2007) I need to put data of some columns on all odd pages and other ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I am running following PHP code to interact with a MS Access database. $odbc_con = new COM("ADODB. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    Data can be inserted, updated and deleted from a table by using a __________ object in ms access Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    data can be inserted, updated and deleted from a table by using _______ object on MS access Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    In MS-Access, the 2. All objects of a database are stored in a single cell. Select the correct answer from above options...
asked Nov 29, 2021 in Education by JackTerrance
...