Solved

How to troubleshoot Access Runtime issues

Posted on 2015-02-01
6
183 Views
Last Modified: 2016-02-11
I have a database created in 2010 that requires getting a value from a certain key in the registry.  This value is the path to the file where the backend tables are stored.  At the startup, the application finds the key in the registry and then refreshes links to the tables.  Well, this process works great in a standard database but when we convert it (a customer requirement) to the runtime it breaks.  I have error handling in place but a message box pops up no err.description.  The whole program closes.  What can I try next.
0
Comment
Question by:EugeneDozier
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 48

Expert Comment

by:Dale Fye (Access MVP)
ID: 40582820
Are you distributing the Runtime version to the same operating system as the development system?
0
 

Author Comment

by:EugeneDozier
ID: 40582830
Good question, I'm not sure.  I'm developing it on a Windows 7 machine.  I will have to check what the end user has but I have tested on a Windows Vista machine and it does not work.

Eugene
0
 
LVL 37

Expert Comment

by:PatHartman
ID: 40582837
I don't like using the registry for anything.  Especially since in some companies, individuals cannot modify the registry.

You can identify the path to the back end by using the MSysObjects table.  Be careful though.  If you have linked spreadsheets, you will need to use the type column to get just the Jet/ACE tables.MSysObjects query
SELECT MSysObjects.Database, MSysObjects.Name, MSysObjects.ForeignName, MSysObjects.Type, MSysObjects.Flags
FROM MSysObjects
WHERE (((MSysObjects.Type)=6))
ORDER BY MSysObjects.Name, MSysObjects.ForeignName;
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:EugeneDozier
ID: 40582847
Thanks Pat.  I don't like to use the registry either but in this case it was a customer requirement.  Your solution looks interesting but I not sure if it will fly with my customer.  I will have to check.  Do you have any ideas with regards to the registry path?
0
 
LVL 37

Expert Comment

by:PatHartman
ID: 40582863
Once the tables are linked, you can always find the path this way.  I think the customer may be worried about initial installs or perhaps inconsistent drive mappings.  When I am working on an app that will be distributed in-house, I always link to the BE using the UNC name.  So if you look at the list I posted, you will see that some links are \\newfiscal\... and some are C:\...  This is a picture from my test version which is the only reason there is a mix.  The ones that are linked to production are not updated so I don't bother to relink them in my test version.  I only relink the tables that get updated so those are C:\...  So, as long as the BE is linked using the UNC method, I don't have to worry about each user having a consistent drive mapped.  In some shops that is a real problem.

When I create an app that is sold to the public, I don't attempt to control where the BE is located.  My install, puts it where I expect it to be but I don't force the issue.  I have the admin link the initial copy and distribute the linked copy to the other users.  In this case though, I insist on a consistently mapped drive.
0
 
LVL 24

Accepted Solution

by:
Bitsqueezer earned 500 total points
ID: 40583832
Hi,

I often read "I have error handling" but after looking into the code there is none or wrong handled. In fact, you need for example a "resume" command to end the error handling, otherwise the error is thrown to the calling procedure and that means this one must stop the error from walking through the calling stack (or any procedure above).

It would be good if you could show the code you use for error handling and even better if you can show the code which causes the crash. The Runtime always crashes when an error is not handled.

Regarding the registry: You can simply use the "GetSetting"/"SaveSetting" procedures of VBA to read from and write to the registry - there is a special key in the registry where these values are saved (different on different operating systems) which is always accessible by any user as these procedures cannot use any other registry keys than this base key. So you have the possibility to use the registry and on the other hand you can manipulate the keys from outside through a group policy or anything like that so the customer can change the place where the backend is stored.

Cheers,

Christian
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question