Ms Access 2010 Error 3151
Contents |
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in
Run Time Error 3151 Odbc Connection Failed Access
Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 runtime error 3151 odbc connection failed access 2010 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a run time error 3151 odbc connection failed oracle question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Run time error 3151 ODBC connection error Microsoft Office for Developers >
Microsoft Visual Basic Runtime Error 3151 Odbc Connection Failed
Access for Developers Question 0 Sign in to vote Hi, I got an error after removed Access databasefrom windows 2000 server to 2008. My Access versionare 97 on 2000 sever and 2003 on 2008server. First, I got error that missing MSOC.dll. Then, I could repeard that error to unchek "Office Compatible 1.0 Type LIvrary" and check in DAO check box on
Error 3151 Odbc Connection Failed Windows 7
reference. But, after do that, I got another erroragain, "Run time error 3151; ODBC-connection to 'name' faild." On the ODBC setting test connection, I can connect successfully. But, still I've gotten same error massage. How can I repeare ?? Thank you for your help. If I shouldn't ask about that quesion in this topic, so sorry. Tuesday, December 21, 2010 5:08 AM Reply | Quote Answers 1 Sign in to vote Hi First of all you should remove all references that you don't need. Then you should compile the whole application. It has to compile without error. Now you should relink all your ODBC tables and ensure that you can open them without error. If the error still occurs try to run following statement in the VBA intermediate window (Ctrl+G) after it occured: Msgbox Errors(0).Description and post the result of the messagebox you get here. Henry
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies runtime error 3151 odbc connection failed access 2013 of this site About Us Learn more about Stack Overflow the company
Kb 209855
Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges access runtime odbc connection failed Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a https://social.msdn.microsoft.com/Forums/office/en-US/980ab9cc-059a-4805-a3b3-12bda863352e/run-time-error-3151-odbc-connection-error?forum=accessdev minute: Sign up ODBC Call Failed - Error 3151 up vote 3 down vote favorite 1 We have an Access database migrated from Access 97 to Acces 2007 with some linked tables to an SQL Server 2008 database. We are using a File DSN in the ODBC Administrator. Connection tests work fine there. In fact, we have a main form in the http://stackoverflow.com/questions/3787484/odbc-call-failed-error-3151 Access 2007 application that shows the data always correctly. The problem appears when we execute a task that makes the following call: Dim dbs As Database
Dim rstAppend As Recordset
Set dbs = CurrentDb
Set rstAppend = dbs.OpenRecordset(strAccessTable, dbOpenDynaset, dbSeeChanges) OpenRecordset throws the error number 3151 and occurs randomly but it appears quite frequently. It's sporadic. When we don't get the error, the task works fine. It not happens always, mostly we're fine. When it happens it happens for all subsequent tasks tried. We have to close and reopen the Access database and pray to the good Lord that it works. Sometimes, refreshing the tables in the Linked Table Manager solves the problem, but others don't. We receive sometimes an error "ODBC--Call Failed" when refreshing the Linked Table Manager. Deleting the File DSN and creating a new one solves the problem. We have tried with two different drivers (SQL Server and SQL Server Native Client 10) and in both cases the problem remains. Also we have tried to put the Access File in the same machine than the SQL Server and the problem remains.
Links Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked Posts Go to Page... Thread Tools Rating: Display Modes 01-29-2013, 04:09 AM http://www.access-programmers.co.uk/forums/showthread.php?t=240995 #1 Insane_ai Newly Registered User Join Date: Mar 2009 Location: Cleveland, OH USA Posts: 161 Thanks: 1 Thanked 14 Times in 11 Posts Oracle ODBC Connection Error 3151 The following code works when employed on Windows XP clients. I am upgrading to Windows 7 Professional 64 bit. I have verified the ODBC connection is working properly through the ODBC management. I get Error 3151 Private Sub Form_Load() Dim DB As DAO.Database Dim TDF As error 3151 DAO.TableDef 'Refresh Databse Link Set DB = CurrentDb() Set TDF = DB.TableDefs("EWVPD_PRODUCT") TDF.Connect = "ODBC;DSN=[DSN_NAME];UID=[USER];PWD=[Password]" TDF.RefreshLink DoCmd.OpenForm "Main", acNormal DoCmd.Close acForm, Me.Name End Sub Error Message: Run-time error '3151' ODBC connection to '[DSN_NAME] failed The code in RED is being flagged for the error. The file's location is in the trusted locations via registry edits. The idea of this code is to make a connection to the Oracle database in the background when the application opens odbc connection failed to avoid password issues. Any advice on the configuration or re-coding of this is greatly appreciated. I suspect I will have to add code to compare the host operating system so I use the proper method depending on the client using the application. __________________ There's nothing like trouble shooting to find out how much I have yet to learn. Last edited by Insane_ai; 01-29-2013 at 04:38 AM. Reason: spelling error(s) Insane_ai View Public Profile Find More Posts by Insane_ai 01-29-2013, 04:38 AM #2 mdlueck Sr. Application Developer Join Date: Jun 2011 Posts: 2,584 Thanks: 110 Thanked 293 Times in 282 Posts Re: Oracle ODBC Connection Error 3151 Quote: Originally Posted by Insane_ai The following code works when employed on Windows XP clients. I am upgrading to Windows 7 Professional 64 bit You should specify what version of Access you had the application working properly with on Windows XP, and what version (including compiled architecture) you are attempting to use on Windows 7. __________________ -- Michael Lueck Lueck Data Systems To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. mdlueck View Public Profile Visit mdlueck's homepage! Find More Posts by mdlueck 01-29-2013, 04:55 AM #3 Insane_ai Newly Registered User Join