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
Solved

How to troubleshoot Access Runtime issues

Posted on 2015-02-01
6
179 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
6 Comments
 
LVL 47

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 35

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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 

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 35

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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 …

837 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