3146 Error
Contents |
One games Xbox 360 games PC
Error 3146 Odbc Call Failed
games Windows games Windows phone games Entertainment All error 3146 odbc call failed access Entertainment Movies & TV Music Business & Education Business Students &
Runtime Error 3146
educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security vba error 3146 Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft error code 3146 Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
Posters Today's Posts Search Community Links Social Groups Pictures & Albums Members List Calendar Search Forums Show Threads Show Posts Tag Search Advanced Search Find All Thanked
Run Time Error 3146
Posts Go to Page... Thread Tools Rating: Display Modes 08-19-2015, 10:15 ms access error 3146 AM #1 Rx_ Nothing In Moderation Join Date: Oct 2009 Location: Denver, Colorado Posts: 2,625 Thanks: 557
Error 3146 Odbc Call Failed Access 2010
Thanked 308 Times in 282 Posts Update to error 3146 ODBC--call failed. SQL Server Linked Tables Does anyone have additonal reasons for Error 3146 besides Required Field? Suspected the problem was a Required https://support.microsoft.com/en-us/kb/161288 Field on the SQL Server Linked Table. Sure enough it was. There seem to be other alternatives listed. MSACCESS 2010 MSAccess Error 3146 using linked tables to SQL Server 2008 R2. Didn't find any post that directly mention the Required Field. Perhaps this post will help others. The code below has one required field commented out. When the comment is removed, the code worked perfectlly http://www.access-programmers.co.uk/forums/showthread.php?t=280228 and appends the new record. This is an old thread as an example: RE: http://www.access-programmers.co.uk/...d.php?t=155472 Another from the Microsoft Community that actually solved the problem in a different way: http://answers.microsoft.com/en-us/o...e-9083541c8891 In addition, some of the Microsoft site solutions don't exactly point out the Required Field at all. Code for an Append new record - works if uncommenting the ID_Area, a Required Field on the linked SQL Server Table. Code: Public Function AppendRecordNavDataToRegulatory() As String ' change to private after testing Dim strSQLWells As String ' create Wells recordset Dim rst As DAO.Recordset ' On Error GoTo Err_WellWellAnotherFineMessYouGotUsIn strSQLWells = " SELECT Wells.ID_Wells, Wells.Well_Name, Wells.WName, Wells.WNumber, Wells.WSection, Wells.WDesc, " & _ " Wells.ID_WellsStatus1, Wells.ID_Area, Wells.ID_County, Wells.ID_Prodg_Fmn, Wells.WellTypeID, Wells.ClassificationID, " & _ " Wells.ID_State, Wells.DtNavigatorHeadersCreated, Wells.API_No, Wells.Permit_File_No, Wells.UIC_No, Wells.FacilityNo " & _ " FROM Wells " ' Set rst = CurrentDb.OpenRecordset(strSQLWells, 2, dbAppendOnly + dbSeeChanges) rst.AddNew 'rst![ID_Wells] = AUTONUMBER assigned by Primary Key REFERENCE ONLY rst![Well_Name] = "Testing" rst![ID_WellsStatus1] = 21 'rst![ID_Area] = 7 ' A Required Field - Error 3146 if this is commented out rst![ID_County] = 3 rst![WellTypeID] = 2 rst![ClassificationID] = 1 rst.Update rst.Close Debug.Print "function AppendRecordNavDataToRegulatory" Set rst = Nothing Exit Function Err_WellWell
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about http://stackoverflow.com/questions/730414/determine-real-cause-of-odbc-failure-error-3146-with-ms-access Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Determine real cause of ODBC failure (error 3146) with ms-access? up vote 6 down error 3146 vote favorite 2 My client is using Access as a front end to a SQL Server database. They recently started getting ODBC - 3146 errors from time to time when running some reports. From what I can tell, this is just a generic ODBC call failed error. I've tried sticking some error handling in the VB script that is launching the reports, but I am not having any luck getting error 3146 odbc extra error information. Code looks a bit like this. Public Function RunReports() On Error GoTo MyErrorTrap DoCmd.OpenReport "blah", acViewPreview DoCmd.Close DoCmd.OpenReport "foo", acViewPreview DoCmd.Close Exit_function: Exit Function MyErrorTrap: Dim errX As DAO.Error Dim MyError As Error If Errors.Count > 1 'This always seems to be 0, so no help For Each errX In DAO.Errors 'These are empty even if dont check for Errors.Count Debug.Print "ODBC Error" Debug.Print errX.Number Debug.Print errX.Description Next errX Else Debug.Print "VBA Error" Debug.Print Err.Number Debug.Print Err.Description End If 'Also have tried checking DBEngine.Errors, but this is empty too End Function I've also enabled tracing on the ODBC side, but that has bogged things down way too much, and I am so far unable to recreate the ODBC error. I am completely open for suggestions on how to diagnose this. vba ms-access vbscript odbc share|improve this question edited Jun 16 '14 at 20:23 Smandoli 4,97622862 asked Apr 8 '09 at 14:57 Aaron Hinni 10.9k33134 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote Use the DbEngine.Errors collection. Sub Update_Temp() On Error GoTo ErrorTrap ' Execute connect code at this point Exit_errortrap: Exit Sub ErrorTrap: Dim myerror As Error For Each myerror In DBEngine.Errors With myerror If .Number <> 3146