473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Random ODBC connection failure

I have an Access frontend that connects to an Oracle9i database backend that is set up with a DSN using the Oracle 8 ODBC Driver. In general, everything works perfectly, but randomly (I say random since I can't find any cause) when I open the Access application and open a form or table that connects to Oracle, I get the error message "ODBC - Connection to 'DSN Name' failed". Then to fix this, all I have to do is use the Linked Table Manager to reselect the DSN and then everything works fine until the error happens again. In case it matters, this Access application exists on a share folder and is used by three people with separate Oracle accounts. While resetting the DSN with the Linked Table Manager is quite easy, I don't want to have to tell my users that they might need to do this every once in a while.
Nov 19 '07 #1
2 3122
MMcCarthy
14,534 Expert Mod 8TB
You can write the code to relink the tables on startup.

Expand|Select|Wrap|Line Numbers
  1. Dim tbl As DAO.TableDef
  2.  
  3.     ' relink the tables
  4.     For Each tbl In CurrentDb.TableDefs
  5.         If tbl.Name <> "MSys*" And tbl.Name <> "~*" Then
  6.             If Len(tbl.Connect) > 0 Then
  7.                 tbl.Connect = "odbc connection string here"
  8.                 tbl.RefreshLink
  9.             End If
  10.         End If
  11.     Next
  12.  
Nov 27 '07 #2
Robert,

Is it possible that the Oracle table is being changed? When you create an ODBC connection in Access, it remembers the table structure but does not automatically update if the underlying table changes. So for example, if you add a column to the table, you need to relink, otherwise you get error 3146 ODBC call failed.

Another thought, I'm not an Oracle person, but is it possible that the Oracle 8 driver is not 100% compatible with the Oracle 9 database?
Nov 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Robert Stearns | last post by:
Note: deliberately xposted to the two newsgroups which seem applicable, after reading several hundred messages from various php groups. Randomly my application gets the message: Warning:...
2
by: vishal | last post by:
I am having multiple threads in my c program to execute same procedure with differnt parameter values every time. I have created different functions to execute the same. However when SQLExecute is...
2
by: Indiana Epilepsy and Child Neurology | last post by:
Before asking this questions I've spent literally _years_ reading (Meyer, Stroustrup, Holub), googling, asking more general design questions, and just plain thinking about it. I am truly unable to...
2
by: Tina Robichaux | last post by:
I have found info on this problem at MS, but they say this problem does not occur with SQL 2K and MDAC 2.6 SP2, yet I am still experiencing it: I have a SQL user specifically created to SELECT...
3
by: Andrew McGregor | last post by:
Hi, I am trying to get a VB.NET application to connect to a local Oracle 9i Lite database. What is the correct form for a connect string? cn = New...
1
by: effendi | last post by:
Hi I downloaded MSDE2005 and I tried to set up an ODBC connection to a database I created. I can see the database using client but I got this error through the ODBC manager An error has occurred...
1
by: mingcur | last post by:
hi all, i am currently doing a website in ASP which is using ODBC to connect the ERP Database in another server . when i run the system in Winodws9 , it works perfectly, no errors and it may get...
6
seligerasmus
by: seligerasmus | last post by:
Greetings, I'm having a bit of trouble with a small web service I've been writing, specifically with the connectivity aspect of the service. My scenario is as follows : I'm using the IBM...
1
by: mikerudy | last post by:
I have an 3rd-party application that uses a SQL back-end, but uses Access 2000 (linked tables all using the same DSN) as an intermediary. We recently upgraded from SQL 7 to SQL 2005, which went...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.