I have a bit of code that is simply importing data from access into MS Excel. On my laptop it always worked instantly. The whole code ran in about 1 or 2 seconds. It worked this well for a very long time. About 7 months ago the time pushed out to 25 seconds or so. I thought it was a server problem and have been asking the IT Server staff to look into server performance. Recently I acquired a desktop to go along with my laptop. Today I ran the code on my desktop and it gave me my old performance of 1 or 2 seconds.
Looking closely I've noticed that it isn't the code but my datasource connection that is slow. It sits there trying to connect for 24 seconds and only runs for 1 second.
I've searched high and low on sites looking for a possible cause. I also struggled with where to post this issue.
Though I'm sure not necessary, here is the connection code.
With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DSN=MS Access Database;DBQ=\\lewcat01\catalog\_Departments\_ProductDataServices\SRP Master\PDM_PartDescriptionMaster.mdb;DefaultDir=\\lewcat01\catalog\_Departm" _
), Array( _
"ents\_ProductDataServices\SRP Master;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;" _
)), Destination:=Range("A1"))
Thanks,
Brooks
Looking closely I've noticed that it isn't the code but my datasource connection that is slow. It sits there trying to connect for 24 seconds and only runs for 1 second.
I've searched high and low on sites looking for a possible cause. I also struggled with where to post this issue.
Though I'm sure not necessary, here is the connection code.
With ActiveSheet.QueryTables.Add(Connection:=Array(Array( _
"ODBC;DSN=MS Access Database;DBQ=\\lewcat01\catalog\_Departments\_ProductDataServices\SRP Master\PDM_PartDescriptionMaster.mdb;DefaultDir=\\lewcat01\catalog\_Departm" _
), Array( _
"ents\_ProductDataServices\SRP Master;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;" _
)), Destination:=Range("A1"))
Thanks,
Brooks