locked
To get the detailed error for 3146: ODBC call fail error. RRS feed

  • Question

  • Hi all,

    I have  a MSaccess front end and SQL server 2005 back end. The functionality is that in the front-end VBA code the application compares the data in the text files which are linked to the application with the data in the tables in SQL server and updates the SQL server tables.

    My problem is that whenever there is a key constraint violated or we try to insert duplicates into the primary key or any other error .... The message box shows only :

    error 3146: ODBC link Failed.

     There is no detailed descrition like the one we get in SQL server where the error and the cause both are shown. Is there a way to retreive the entire error???

    Note: This question has not been answered in any previous post. kindly do not think otherwise.

    Thanks in advance.

     

    Tuesday, July 5, 2011 5:54 AM

Answers

  • I assume that you are using the ODBC DSN for communicating with the backend SQL Server 2005 DB from your front end Access Application. Can you enable ODBC logging following the instructions in : http://support.microsoft.com/kb/274551 [How To Generate an ODBC Trace with ODBC Data Source Administrator]

    This ODBC trace can give you more details about the exceptions you see on the application..

    Note: Do not forget to turn tracing off when you are done with the troubleshooting. If you keep tracing set to on, it degrades your application performance.

     

    Hope this helps..

     


    Chaitanya( Twitter | Blogs )

    Any documentation bug? Tell us about it at Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    The next CTP for SQL Server Code Name "Denali" is coming soon. Sign up now to be notified of the next CTP release.
    • Marked as answer by WeiLin Qiao Wednesday, July 13, 2011 7:41 AM
    Tuesday, July 5, 2011 6:34 AM

All replies

  • I assume that you are using the ODBC DSN for communicating with the backend SQL Server 2005 DB from your front end Access Application. Can you enable ODBC logging following the instructions in : http://support.microsoft.com/kb/274551 [How To Generate an ODBC Trace with ODBC Data Source Administrator]

    This ODBC trace can give you more details about the exceptions you see on the application..

    Note: Do not forget to turn tracing off when you are done with the troubleshooting. If you keep tracing set to on, it degrades your application performance.

     

    Hope this helps..

     


    Chaitanya( Twitter | Blogs )

    Any documentation bug? Tell us about it at Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    The next CTP for SQL Server Code Name "Denali" is coming soon. Sign up now to be notified of the next CTP release.
    • Marked as answer by WeiLin Qiao Wednesday, July 13, 2011 7:41 AM
    Tuesday, July 5, 2011 6:34 AM
  • Hello teja765,

    You wrote "This question has not been answered in any previous post" . Are you writing about this thread ?

    http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/807c5f6a-ff1d-4080-9f30-a75b0ce62e2a/

    I propose you that a moderator merges these both threads ( the best way not to repeat the same informations and not to lose time ). It is a current task for moderators.But if you created other threads about the same problem, please , could you provide the links towards these similar threads ? I understand that an original poster might create several threads about the same problem if he/she thinks not to have a full answer; But i prefer to have your agreement ( i am trying to have regards about the OP every time i can )

    Have a nice day


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.
    Tuesday, July 5, 2011 11:40 AM