473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Local tables opening slow Access 2000

jonnycakes
Hello again to my favorite forum,

So, I have an Access 2000 split database, the backend (mdb) is stored on a shared drive while my front end(mde) is stored on my local machine. I'm experiencing a long wait time when attempting to open local tables and linked tables.

I found this article in many places during my search for a solution: http://bytes.com/topic/access/answers/728919-slow-opening-local-tables-access-2003-a

I followed Allen Browne's and Microsoft's suggestions by changing the SubDataSheet Name property to None on each of my tables, and it helped to a degree. However, the table I have with 2500 records, approx. 20 columns(text, dates, memos, yes/no) can take up to 2 minutes to populate in my front end, but my backend loads the table instantly.

What's really odd about this is that I've exported this table's structure(no data) from the backend to the front end, and removed the link to rule out the network. In other words same table, unlinked(local), no data, and it still takes a minute or two to load. It says "beginning save procedure" in the lower left hand corner when the database is loading the table.

Any ideas you may have to remedy this annoyance?

Thank you in advance for any knowledge you may be able to share.
Aug 30 '12 #1
3 4029
TheSmileyCoder
2,322 Expert Mod 2GB
Access can be a bit special sometimes, and this can be one of its quirks. Whether or not what I will suggest applies for you, I dont know, but here goes.

Imagine the scenario of a button which closes form a and then opens form B. If form A was the only form open, access will then release your connection to the backend, and when you then open form B access will have to re-establish the link. The same can actually apply even for a local database.

First a simple test to see if this applies to you.
  1. Open your database while holding down Shift to override any startup procedures you have.
  2. Open the table you say is slow in opening and note how long time it takes to open.
  3. Close it again
  4. Now open any other LOCAL table and leave it open.
  5. Once again open the table that you say is slow.

If the second time was significantly faster then the first, the issue I describe is most likely what is affecting you. This effect will be larger if the frontend is not stored on your local PC but on a network drive.

I fix this by creating a table in my frontend, tbl_LocalStayConnected and in my backend tbl_ServerStayConnected and add a single field to each (Field name irrelevant as long as the type is the same in each table.) In your frontend create a link to the tbl_ServerStayConnected.

Now create a form frm_StayConnected and as its recordsource have:
Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM tbl_LocalStayConnected 
  2.          INNER JOIN tbl_ServerStayConnected on 
  3.          tbl_LocalStayConnected.FieldName=tbl_ServerStayConnected .FieldName
Finally when the database starts op open the form in hidden mode so the user never sees it.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm "frm_StayConnected ", , , , , acHidden
This will ensure that a connection is always live.

One thing of note, is that it might degrade performance if you have several concurrent users, but for me, I haven't noticed any problems with 50 users at a time (havent been able to test with more then that)
Aug 30 '12 #2
@TheSmileyCoder
Smiley, Thank you for your detailed response, but the second test(opening the local table while another local table was opened) did not do the trick. I'd like to also update my previous estimate of a 2 minute lag, it actually takes 4 minutes to to open this table.

I haven't tried the "stayconnected" method that you shared, but I am very interested. Currently, I'm using the code found here: http://www.fmsinc.com/MicrosoftAcces...dDatabase.html

Expand|Select|Wrap|Line Numbers
  1. Sub OpenAllDatabases(pfInit As Boolean)
  2.   ' Open a handle to all databases and keep it open during the entire time the application runs.
  3.   ' Params  : pfInit   TRUE to initialize (call when application starts)
  4.   '                    FALSE to close (call when application ends)
  5.   ' Source  : Total Visual SourceBook
  6.  
  7.   Dim x As Integer
  8.   Dim strName As String
  9.   Dim strMsg As String
  10.  
  11.   ' Maximum number of back end databases to link
  12.   Const cintMaxDatabases As Integer = 2
  13.  
  14.   ' List of databases kept in a static array so we can close them later
  15.   Static dbsOpen() As DAO.Database
  16.  
  17.   If pfInit Then
  18.     ReDim dbsOpen(1 To cintMaxDatabases)
  19.     For x = 1 To cintMaxDatabases
  20.       ' Specify your back end databases
  21.       Select Case x
  22.         Case 1:
  23.           strName = "H:\folder\Backend1.mdb"
  24.         Case 2:
  25.           strName = "H:\folder\Backend2.mdb"
  26.       End Select
  27.       strMsg = ""
  28.  
  29.       On Error Resume Next
  30.       Set dbsOpen(x) = OpenDatabase(strName)
  31.       If Err.Number > 0 Then
  32.         strMsg = "Trouble opening database: " & strName & vbCrLf & _
  33.                  "Make sure the drive is available." & vbCrLf & _
  34.                  "Error: " & Err.Description & " (" & Err.Number & ")"
  35.       End If
  36.  
  37.       On Error GoTo 0
  38.       If strMsg <> "" Then
  39.         MsgBox strMsg
  40.         Exit For
  41.       End If
  42.     Next x
  43.   Else
  44.     On Error Resume Next
  45.     For x = 1 To cintMaxDatabases
  46.       dbsOpen(x).Close
  47.     Next x
  48.   End If
  49. End Sub
Do you or does anyone else see any downfalls with this code? How does it compare to your method smiley? Any other suggestions as for decreasing response time of this table? All other linked and local tables have been opening quickly.

This is odd, I exported the table's structure from the backend to the frontend, then from the front end, I copied the table(the one that was just added) and pasted it's structure, and it loaded almost instantly.

Any ideas? Thanks again!
Aug 31 '12 #3
TheSmileyCoder
2,322 Expert Mod 2GB
You are quite correct, the purpose of the FMS code is identical to mine, allthough the method is different.

I choose to do it through a form and its recordset because I felt it was a safer approach. If you have a unhandled error (Which of course you shouldn't, but still :P) the variables in your procedure will be wiped from memory, and my (unconfirmed) fear would be that you would by accident maintain a locking connection on your backend databases.

The form frm_StayConnected will remain open, even if a unhandled error occurs.

You could argue that their method is neater since it doesn't require extra tables to be setup.

However, I also code in the same form to do other various bits such as logging the user out when the form closes (Since its hidden the form only closes when the user closes the application)
Aug 31 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
1
by: Yannick Turgeon | last post by:
Hello, This is a repost (see under the "dotted" line) from 2 days ago. Hope someone could help. Norton Antivirus 2003 is installed on this computer. Could it cause a problem? Another...
5
by: kathyk | last post by:
Hi All, We are moving to Access 2003 in a month or so, so i started testing my data base files in v2003. When The mdb open I get 3 warning messagase about blocking unsafe expressions. Security...
2
by: plau011 | last post by:
Hello Access gurus, I am curious as to why you can't open an Access 2003 Db with Access 2000. We have a Visual Basic application which is using DAO 3.6 to connect to the Access database. It IS...
4
by: cvopicka | last post by:
i have found many refrences to access being slow over a netowrk but my boss and i just found this and i was hoping to get some help. on the local machine we have the Access 2000 format database...
0
by: Stumped | last post by:
I'm using Access 2000 on a Dell PC with 256MB of RAM, and it freezes up almost immediately after opening the database. The database is on an internet server, but no-one else who connects notices...
3
by: lopedon | last post by:
I've got a performance issue in Access 2000 running on Windows 2000. Opening a table local to the MDB takes about 1-2 seconds normally. If I log out of the windows profile that is normally used on...
4
by: ThePhenix | last post by:
Hi everybody, I have recently been doing a conversion for my boss for a access 2000 database (both front and backend) to a MSSQL backend. I finished the conversion today (as quite a lot of the...
2
by: Bruce | last post by:
Hello all, I have an annoyance that is common to all of the Access 2003 applications I manage. All of the applications are split front end/ back end with a front end copy on each client...
1
by: steven_nospam at Yahoo! Canada | last post by:
I am a UNIX person (not much experience with MS Access) who during a recent upgrade on an IBM RS/6000 server had to convert our system due to an upgrade to a new software revision. The old...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.