Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to troubleshoot Access Runtime issues

Posted on 2015-02-01
6
Medium Priority
?
191 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
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 39

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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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 39

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 1500 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

604 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