5

I am converting MS Access 2000 to MS Access 2010.The issue i am facing is,the MS Access 2010 is very slow (even freezes) after conversion.

Previous Config: MS Access 2000 on XP with Link Tables to Sql server 2000 sitting on Windows 2000

New Config: MS Access 2010 on Windows 7 with Link Tables to Sql server 2000 sitting on Windows 2000

Access under New Config is painfully slow or sometimes hangs and crashes Same situation with a Visual Studio Desktop Application,It runs painfully slow on Win7,while it runs great on XP.

Things I have tried :

  1. Converting the MS Access 2000 by creating a New MS Access 2010 and importing all the objects from 2000 Version
  2. Refreshing Linked Tables etc
  3. Changing the MS Office Max Buffer size in Registry to 55000(as suggested in some MS support sites)

Little to no improvement so far.

Ravi Yenugu
  • 3,895
  • 5
  • 40
  • 58
  • 1
    Is there any reason you didn't upgrade SQL Server 2000 to something like SQL Server 2008 Express? – HK1 Apr 12 '12 at 19:20
  • 2
    Did you see http://social.technet.microsoft.com/Forums/en/office2007deploymentcompatibility/thread/88542372-0fcb-4521-87ec-e2ab72e688dd ? – Fionnuala Apr 12 '12 at 21:58
  • It's always best to avoid linked tables when dedicated db server's are in use, take advantage of their processing power and adopt an ADO connection style throughout. This will have the server carrying out all the work except for anything which cannot be done outside of access. – Matt Donnan Apr 13 '12 at 08:29
  • @MattDonnan That is not what Microsoft is recommending with Access 2010. There are supporting linked tables. – Fionnuala Apr 13 '12 at 11:35
  • 1
    @Remou True, although I do expect Microsoft to defend and support their product features. I only mention the ADO method because it has always served me well when the linked tables approach has run into optimisation issues. I do still support linked tables when using access as the database backend. – Matt Donnan Apr 13 '12 at 12:43
  • @HK1 I could not use latest SQL Express version because of DB size limits – Ravi Yenugu Apr 17 '12 at 13:10
  • Is your SQL Server Client software up-to-date ? – iDevlop Apr 17 '12 at 13:42
  • Can you precise what is actually slow, it that tables opened in view mode, is that forms, is that reports ? Does the slowness is somehow related with VBA code ? Is is slow to display large range of data, few range of data among a large table, or even a little table? – Skrol29 Apr 17 '12 at 14:16
  • @Skrol29 , By slow i mean everything you said above .Loading the data,Forms,switching b/w forms ,search operations on tables irrespective of size etc – Ravi Yenugu Apr 17 '12 at 14:59
  • I played around using different drivers but no signs of improvement.I can switch from Access to Visual studio C sharp or similar but i am not sure the problem will go away,since i have the same situation with an existing Desktop Application built from VS 2008,Same story freezes/Not-Responding ,Circling busy Blue indicator!! – Ravi Yenugu Apr 17 '12 at 19:12
  • Sounds like you need to troubleshoot it as a "SQL Server 2000 on Windows 7" problem. Have you tried disabling the Windows 7 firewall temporarily? What security software are you using? Have you tried disabling it? – HK1 Apr 17 '12 at 21:21
  • SQL Server 2000 is not supported on Windows 7. http://social.msdn.microsoft.com/Forums/en/sqlsetupandupgrade/thread/2928d387-f203-4c50-a06e-34ce28635417 – HK1 Apr 17 '12 at 21:24
  • @HK1 I Apologize if the config details mentioned earlier were not clear,The sql server 2000 is sitting on Windows 2000 PC – Ravi Yenugu Apr 18 '12 at 13:16
  • Yeah, sorry, I did misunderstand. – HK1 Apr 18 '12 at 13:29

4 Answers4

2

It is hard to reply because the origin of the problem can be multiple. Since the two clients has not the same OS configuration, we cannot exclude that the problem comes from a difference of configuration between the two OS.

First you can discern if the connexion is slow because of the PC, Access or your DB :

Test : direct connection

You can try the direct connexion to SQL server using a direct connexion instead of linked tables. For this, you can create a new Access Project connected to your SQL Server. An Access Project is a type of Access database which directly connect to an SQL Server, without linked table. It uses a native client. You can view tables of your SQL Server database directely in Access, and you can edit them. The extension of an Access Project is not MDB but ADP. Access Projects are hidden in Access 2010 but well supported.

To create an Access Project: go to menu File -> New, then click of the file icon, and then choose "Save as type" : "Microsoft Access Project (*.adp)".

When the ADP is created, it should ask you to enter the parameter for an existing SQL Server database. Enter your parameters.

Then go to the table panel, and try to browse some table and check if it is slow or fast.

If it is slow => then the problem may comes from your PC or the connexion. You can try with another software for testing the direct connection of you have one that can connect to SQL Server.

If it is fast => then the slowness comes from the ACCDB or the ODBC link.

Also check :

  • Ms Access is up to date with last version and Ms Office patches
  • your ODBC system and "ODBC driver to SQL Server" are up to date (take to last version of MDAC)
  • Your Windows 7 and Ms Access and ODBC versions have the same bits range (32-bits or 64-bits)
  • Your DSN string for the ODBC connexion to SQL Server is normalized
  • If your DSN is a system DSN, then recreate a new one as a user DSN and try.
Skrol29
  • 5,402
  • 1
  • 20
  • 25
2

Have you tried keeping the connection open? This may only apply to linked tables in another accdb, not sure.

I had this issue a while back so I now keep the connection open as long as Access is running, here's a stripped-down version of my sub for this:

Public Sub updateTables(bClose As Boolean)

Dim dbsCurrent As Database
Dim tdfSingle As TableDef
Dim tdfCollection As TableDefs
Dim sBasePath As String, sPath As String
Set dbsCurrent = CurrentDb
Set tdfCollection = dbsCurrent.TableDefs
Set dbsHold = dbsCurrent

Static dbsOpen As DAO.Database

If bClose Then
    dbsOpen.Close
Else
    sBasePath = Left(CurrentDb.Name, InStrRev(CurrentDb.Name, "\")) & "SB-Support\"
    sPath = GetUNC(sBasePath & "data.dat")

    Set dbsOpen = OpenDatabase(sPath, False, False, "MS Access;")
    For Each tdfSingle In tdfCollection
        If tdfSingle.SourceTableName <> "" Then
            If tdfSingle.Fields.Count = 0 Then
                tdfSingle.Connect = ";DATABASE=" & sPath
                tdfSingle.RefreshLink
            End If
        End If
    Next
End If

Exit Sub

End Sub

I think I originally retrieved it from here: http://www.fmsinc.com/microsoftaccess/performance/linkeddatabase.html

I don't have a SQL server requirement but a quick google gave me this for OpenDatabase for a SQL connection:

Dim cs As String
Dim cn As DAO.Database
Dim ws As DAO.Workspace
Set ws = DBEngine.Workspaces(0)
cs = "ODBC;DRIVER=SQL Server;SERVER=Main\SQLEXPRESS;DATABASE=Workwise;APP=Visual Basic"      'UID=Peter;PWD="
Set cn = ws.OpenDatabase("Workwise", dbDriverNoPrompt, True, cs)

http://www.vbforums.com/archive/index.php/t-572723.html

Jeff
  • 846
  • 8
  • 13
2

When it is freezing I would check what queries are actually running in sql-server is happening in sql-server. eg. by running something like this:

select (SELECT text FROM ::fn_get_sql(s1.sql_handle)), *
from sys.sysprocesses s1

I debugged a slow access application once where the access queries were not being very well translated to sql-server. Something simple in an access query caused many inefficient sql-server queries to run. We re-wrote a few of these queries as sql-server views and solved it for us.

Adam Butler
  • 3,023
  • 5
  • 35
  • 40
1

First, make sure you have the latest MDAC. Next I would recommend creating stored procedures or table-valued functions in SQL rather than running the queries from Access itself. Access will pre-parse the query to make sure it will run against SQL Server, and that can slow things down. Last, if Access is doing Updates and Deletes, it will use a SQL Server TIMESTAMP column to make sure nobody else has changed that record while you had the form open. If SQL doesn't have such a column, Access has to do all of the tracking. We just went through this ourselves - I'll ask the developer for any tips and post in the comments if she has anything.

Russell Fox
  • 5,273
  • 1
  • 24
  • 28