Advertisement

06.16.2008 at 06:21AM PDT, ID: 23487981
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

ODBC Call Failed with MySQL Linked Tables in Access 2007

Asked by noisecouk in VB Database Programming, Microsoft Access Database, MySQL Server

Tags: , , , ,

I have an Access 2007 frontend which connects to several linked tables on a MySQL server using ODBC, through VBA. On my Windows XP Professional SP3 machine with MySQL ODBC Connector  3.51 I have no problems using this frontend. If the network goes down I will get an 'ODBC - Call failed' when I try to do something. Once the network connection is reestablished the operation resumes successfully.

On a Windows Vista Ultimate laptop, also with Access 2007, the frontend will suddenly stop working after 30-60 minutes of running. Any operation which opens a recordset will pop up with an "ODBC - Call Failed" message (runtime error 3146). This will happen predictibly when there is a connection interruption and I suspect out of office there is some minor glitch with the VPN causing a brief otherwise unnoticeable connection interruption.

The problem I am having is that although my pc will reconnect and resume as soon as a connection is re-established, the Vista machine will remain unable to reconnect and the "odbc - call failed" error persists. This is despite the fact that in ODBC settings in control panel the connecion test will succeed. I have very carefully been through all the Microsoft Access and ODBC connector settings and made sure all the same options and timeouts are set on both systems. On the Vista machine I have also tried uninstalling the 32-bit 3.51 driver and tried the 64-bit 5.1 driver but this has not changed anything. Once the "call failed" message appears, the only way to get the database to work is to close the frontend entirely and re-open it. After doing this, everything will immediately work as normal.

I have investigated ways of manually reconnecting to the server but nothing seems to work. For example, refreshing the table links in vba will still cause the "call failed" message to appear. Even deleting the table definitions and recreating them will bring up the "call failed" message at the point of appending the new tabledef to the current database's tabledefs collection.

e.g
currentdb.tabledefs("Test").refreshlinks '< odbc call failed

or:
Dim NewTD as New TableDef
currentdb.tabledefs.delete "Test"
newtd.connect = "odbc;DSN=noise" ' I have tried this with both a short connection string specifiying just the DSN and a long one with full server connection details
newtd.sourcetablename = "Test"
currentdb.tabledefs.append newtd   '< odbc call failed

Double clicking on a linked table will pop up with "odbc - call failed. followed by "The MySQL Server has gone away." It is just puzzling because my pc will reconnect and resume while the Vista pc will just refuse to work until the database is closed and reopened.

I would be very grateful if anyone could suggest what I could change on the vista pc so that Access/ODBC will actually reconnect after a failure instead of getting stuck. Alternatively are there are any other reconnection operations I could try in my code when it happens other than the ones I have mentioned above?


Start Free Trial
[+][-]06.16.2008 at 07:19AM PDT, ID: 21793824

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 02:40AM PDT, ID: 21801207

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.27.2008 at 06:29AM PDT, ID: 21883402

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Database Programming, Microsoft Access Database, MySQL Server
Tags: Microsoft, Access, 2007, VBA, ODBC - Call Failed
Sign Up Now!
Solution Provided By: noisecouk
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628