Solved

How to troubleshoot Access Runtime issues

Posted on 2015-02-01
6
177 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Modern/Metro styled message box and input box that directly can replace MsgBox() and InputBox()in Microsoft Access 2013 and later. Also included is a preconfigured error box to be used in error handling.
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 Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

776 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