Runtime error 3146 odbc ошибка вызова

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 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.

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 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.

В этой статье представлена ошибка с номером Ошибка 3146, известная как Ошибка Microsoft Access 3146, описанная как ODBC — вызов не удался.

О программе Runtime Ошибка 3146

Время выполнения Ошибка 3146 происходит, когда Microsoft Access дает сбой или падает во время запуска, отсюда и название. Это не обязательно означает, что код был каким-то образом поврежден, просто он не сработал во время выполнения. Такая ошибка появляется на экране в виде раздражающего уведомления, если ее не устранить. Вот симптомы, причины и способы устранения проблемы.

Определения (Бета)

Здесь мы приводим некоторые определения слов, содержащихся в вашей ошибке, в попытке помочь вам понять вашу проблему. Эта работа продолжается, поэтому иногда мы можем неправильно определить слово, так что не стесняйтесь пропустить этот раздел!

  • Доступ — НЕ ИСПОЛЬЗУЙТЕ этот тег для Microsoft Access, используйте вместо него [ms-access]
  • Вызов — Вызов действие по вызову подпрограммы кода, внешней программы или сценария в среде программирования.
  • Odbc — Open Database Connectivity ODBC предоставляет стандартный программный интерфейс для доступа к СУБД систем управления базами данных .
  • Access — Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, которая обычно сочетает в себе реляционную СУБД Microsoft JetACE с графическим пользовательским интерфейсом и программным обеспечением. -инструменты разработки.
  • Доступ к Microsoft — Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, которая обычно объединяет реляционное ядро ​​СУБД Microsoft JetACE с графическим пользователем. интерфейс и средства разработки программного обеспечения
Симптомы Ошибка 3146 — Ошибка Microsoft Access 3146

Ошибки времени выполнения происходят без предупреждения. Сообщение об ошибке может появиться на экране при любом запуске %программы%. Фактически, сообщение об ошибке или другое диалоговое окно может появляться снова и снова, если не принять меры на ранней стадии.

Возможны случаи удаления файлов или появления новых файлов. Хотя этот симптом в основном связан с заражением вирусом, его можно отнести к симптомам ошибки времени выполнения, поскольку заражение вирусом является одной из причин ошибки времени выполнения. Пользователь также может столкнуться с внезапным падением скорости интернет-соединения, но, опять же, это не всегда так.

Fix Ошибка Microsoft Access 3146 (Error Ошибка 3146)
(Только для примера)

Причины Ошибка Microsoft Access 3146 — Ошибка 3146

При разработке программного обеспечения программисты составляют код, предвидя возникновение ошибок. Однако идеальных проектов не бывает, поскольку ошибки можно ожидать даже при самом лучшем дизайне программы. Глюки могут произойти во время выполнения программы, если определенная ошибка не была обнаружена и устранена во время проектирования и тестирования.

Ошибки во время выполнения обычно вызваны несовместимостью программ, запущенных в одно и то же время. Они также могут возникать из-за проблем с памятью, плохого графического драйвера или заражения вирусом. Каким бы ни был случай, проблему необходимо решить немедленно, чтобы избежать дальнейших проблем. Ниже приведены способы устранения ошибки.

Методы исправления

Ошибки времени выполнения могут быть раздражающими и постоянными, но это не совсем безнадежно, существует возможность ремонта. Вот способы сделать это.

Если метод ремонта вам подошел, пожалуйста, нажмите кнопку upvote слева от ответа, это позволит другим пользователям узнать, какой метод ремонта на данный момент работает лучше всего.

Обратите внимание: ни ErrorVault.com, ни его авторы не несут ответственности за результаты действий, предпринятых при использовании любого из методов ремонта, перечисленных на этой странице — вы выполняете эти шаги на свой страх и риск.

Метод 1 — Закройте конфликтующие программы

Когда вы получаете ошибку во время выполнения, имейте в виду, что это происходит из-за программ, которые конфликтуют друг с другом. Первое, что вы можете сделать, чтобы решить проблему, — это остановить эти конфликтующие программы.

  • Откройте диспетчер задач, одновременно нажав Ctrl-Alt-Del. Это позволит вам увидеть список запущенных в данный момент программ.
  • Перейдите на вкладку «Процессы» и остановите программы одну за другой, выделив каждую программу и нажав кнопку «Завершить процесс».
  • Вам нужно будет следить за тем, будет ли сообщение об ошибке появляться каждый раз при остановке процесса.
  • Как только вы определите, какая программа вызывает ошибку, вы можете перейти к следующему этапу устранения неполадок, переустановив приложение.

Метод 2 — Обновите / переустановите конфликтующие программы

Использование панели управления

  • В Windows 7 нажмите кнопку «Пуск», затем нажмите «Панель управления», затем «Удалить программу».
  • В Windows 8 нажмите кнопку «Пуск», затем прокрутите вниз и нажмите «Дополнительные настройки», затем нажмите «Панель управления»> «Удалить программу».
  • Для Windows 10 просто введите «Панель управления» в поле поиска и щелкните результат, затем нажмите «Удалить программу».
  • В разделе «Программы и компоненты» щелкните проблемную программу и нажмите «Обновить» или «Удалить».
  • Если вы выбрали обновление, вам просто нужно будет следовать подсказке, чтобы завершить процесс, однако, если вы выбрали «Удалить», вы будете следовать подсказке, чтобы удалить, а затем повторно загрузить или использовать установочный диск приложения для переустановки. программа.

Использование других методов

  • В Windows 7 список всех установленных программ можно найти, нажав кнопку «Пуск» и наведя указатель мыши на список, отображаемый на вкладке. Вы можете увидеть в этом списке утилиту для удаления программы. Вы можете продолжить и удалить с помощью утилит, доступных на этой вкладке.
  • В Windows 10 вы можете нажать «Пуск», затем «Настройка», а затем — «Приложения».
  • Прокрутите вниз, чтобы увидеть список приложений и функций, установленных на вашем компьютере.
  • Щелкните программу, которая вызывает ошибку времени выполнения, затем вы можете удалить ее или щелкнуть Дополнительные параметры, чтобы сбросить приложение.

Метод 3 — Обновите программу защиты от вирусов или загрузите и установите последнюю версию Центра обновления Windows.

Заражение вирусом, вызывающее ошибку выполнения на вашем компьютере, необходимо немедленно предотвратить, поместить в карантин или удалить. Убедитесь, что вы обновили свою антивирусную программу и выполнили тщательное сканирование компьютера или запустите Центр обновления Windows, чтобы получить последние определения вирусов и исправить их.

Метод 4 — Переустановите библиотеки времени выполнения

Вы можете получить сообщение об ошибке из-за обновления, такого как пакет MS Visual C ++, который может быть установлен неправильно или полностью. Что вы можете сделать, так это удалить текущий пакет и установить новую копию.

  • Удалите пакет, выбрав «Программы и компоненты», найдите и выделите распространяемый пакет Microsoft Visual C ++.
  • Нажмите «Удалить» в верхней части списка и, когда это будет сделано, перезагрузите компьютер.
  • Загрузите последний распространяемый пакет от Microsoft и установите его.

Метод 5 — Запустить очистку диска

Вы также можете столкнуться с ошибкой выполнения из-за очень нехватки свободного места на вашем компьютере.

  • Вам следует подумать о резервном копировании файлов и освобождении места на жестком диске.
  • Вы также можете очистить кеш и перезагрузить компьютер.
  • Вы также можете запустить очистку диска, открыть окно проводника и щелкнуть правой кнопкой мыши по основному каталогу (обычно это C :)
  • Щелкните «Свойства», а затем — «Очистка диска».

Метод 6 — Переустановите графический драйвер

Если ошибка связана с плохим графическим драйвером, вы можете сделать следующее:

  • Откройте диспетчер устройств и найдите драйвер видеокарты.
  • Щелкните правой кнопкой мыши драйвер видеокарты, затем нажмите «Удалить», затем перезагрузите компьютер.

Метод 7 — Ошибка выполнения, связанная с IE

Если полученная ошибка связана с Internet Explorer, вы можете сделать следующее:

  1. Сбросьте настройки браузера.
    • В Windows 7 вы можете нажать «Пуск», перейти в «Панель управления» и нажать «Свойства обозревателя» слева. Затем вы можете перейти на вкладку «Дополнительно» и нажать кнопку «Сброс».
    • Для Windows 8 и 10 вы можете нажать «Поиск» и ввести «Свойства обозревателя», затем перейти на вкладку «Дополнительно» и нажать «Сброс».
  2. Отключить отладку скриптов и уведомления об ошибках.
    • В том же окне «Свойства обозревателя» можно перейти на вкладку «Дополнительно» и найти пункт «Отключить отладку сценария».
    • Установите флажок в переключателе.
    • Одновременно снимите флажок «Отображать уведомление о каждой ошибке сценария», затем нажмите «Применить» и «ОК», затем перезагрузите компьютер.

Если эти быстрые исправления не работают, вы всегда можете сделать резервную копию файлов и запустить восстановление на вашем компьютере. Однако вы можете сделать это позже, когда перечисленные здесь решения не сработают.

Другие языки:

How to fix Error 3146 (Microsoft Access Error 3146) — ODBC—call failed.
Wie beheben Fehler 3146 (Microsoft Access-Fehler 3146) — ODBC—Aufruf fehlgeschlagen.
Come fissare Errore 3146 (Errore di Microsoft Access 3146) — ODBC: chiamata non riuscita.
Hoe maak je Fout 3146 (Microsoft Access-fout 3146) — ODBC—aanroep mislukt.
Comment réparer Erreur 3146 (Erreur Microsoft Access 3146) — ODBC—l’appel a échoué.
어떻게 고치는 지 오류 3146 (마이크로소프트 액세스 오류 3146) — ODBC—호출에 실패했습니다.
Como corrigir o Erro 3146 (Erro 3146 do Microsoft Access) — ODBC — falha na chamada.
Hur man åtgärdar Fel 3146 (Microsoft Access-fel 3146) — ODBC-samtal misslyckades.
Jak naprawić Błąd 3146 (Błąd Microsoft Access 3146) — ODBC — wywołanie nie powiodło się.
Cómo arreglar Error 3146 (Error 3146 de Microsoft Access) — ODBC: la llamada falló.

The Author Об авторе: Фил Харт является участником сообщества Microsoft с 2010 года. С текущим количеством баллов более 100 000 он внес более 3000 ответов на форумах Microsoft Support и создал почти 200 новых справочных статей в Technet Wiki.

Следуйте за нами: Facebook Youtube Twitter

Последнее обновление:

24/05/22 01:21 : Пользователь Android проголосовал за то, что метод восстановления 1 работает для него.

Рекомендуемый инструмент для ремонта:

Этот инструмент восстановления может устранить такие распространенные проблемы компьютера, как синие экраны, сбои и замораживание, отсутствующие DLL-файлы, а также устранить повреждения от вредоносных программ/вирусов и многое другое путем замены поврежденных и отсутствующих системных файлов.

ШАГ 1:

Нажмите здесь, чтобы скачать и установите средство восстановления Windows.

ШАГ 2:

Нажмите на Start Scan и позвольте ему проанализировать ваше устройство.

ШАГ 3:

Нажмите на Repair All, чтобы устранить все обнаруженные проблемы.

СКАЧАТЬ СЕЙЧАС

Совместимость

Требования

1 Ghz CPU, 512 MB RAM, 40 GB HDD
Эта загрузка предлагает неограниченное бесплатное сканирование ПК с Windows. Полное восстановление системы начинается от $19,95.

ID статьи: ACX06523RU

Применяется к: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000

Icon Ex Номер ошибки: Ошибка 3146
Название ошибки: Microsoft Access Error 3146
Описание ошибки: ODBC—call failed.
Разработчик: Microsoft Corporation
Программное обеспечение: Microsoft Access
Относится к: Windows XP, Vista, 7, 8, 10, 11

Обзор «Microsoft Access Error 3146»

Как правило, практикующие ПК и сотрудники службы поддержки знают «Microsoft Access Error 3146» как форму «ошибки во время выполнения». Когда дело доходит до Microsoft Access, инженеры программного обеспечения используют арсенал инструментов, чтобы попытаться сорвать эти ошибки как можно лучше. К сожалению, многие ошибки могут быть пропущены, что приводит к проблемам, таким как те, с ошибкой 3146.

Некоторые люди могут столкнуться с сообщением «ODBC—call failed.» во время работы программного обеспечения. Сообщение об этой ошибке 3146 позволит разработчикам обновить свое приложение и исправить любые ошибки, которые могут вызвать его. Затем Microsoft Corporation исправит ошибки и подготовит файл обновления для загрузки. Эта ситуация происходит из-за обновления программного обеспечения Microsoft Access является одним из решений ошибок 3146 ошибок и других проблем.

«Microsoft Access Error 3146» чаще всего может возникать при загрузке Microsoft Access. Рассмотрим распространенные причины ошибок ошибки 3146 во время выполнения:

Ошибка 3146 Crash — Ошибка 3146 является хорошо известной, которая происходит, когда неправильная строка кода компилируется в исходный код программы. Это возникает, когда Microsoft Access не реагирует на ввод должным образом или не знает, какой вывод требуется взамен.

Утечка памяти «Microsoft Access Error 3146» — если есть утечка памяти в Microsoft Access, это может привести к тому, что ОС будет выглядеть вялой. Возможные искры включают сбой освобождения, который произошел в программе, отличной от C ++, когда поврежденный код сборки неправильно выполняет бесконечный цикл.

Ошибка 3146 Logic Error — логическая ошибка возникает, когда Microsoft Access производит неправильный вывод из правильного ввода. Когда точность исходного кода Microsoft Corporation низкая, он обычно становится источником ошибок.

Как правило, такие Microsoft Corporation ошибки возникают из-за повреждённых или отсутствующих файлов Microsoft Access Error 3146, а иногда — в результате заражения вредоносным ПО в настоящем или прошлом, что оказало влияние на Microsoft Access. Как правило, решить проблему можно заменой файла Microsoft Corporation. Помимо прочего, в качестве общей меры по профилактике и очистке мы рекомендуем использовать очиститель реестра для очистки любых недопустимых записей файлов, расширений файлов Microsoft Corporation или разделов реестра, что позволит предотвратить появление связанных с ними сообщений об ошибках.

Ошибки Microsoft Access Error 3146

Эти проблемы Microsoft Access, связанные с Microsoft Access Error 3146, включают в себя:

  • «Ошибка программы Microsoft Access Error 3146. «
  • «Недопустимая программа Win32: Microsoft Access Error 3146»
  • «Извините, Microsoft Access Error 3146 столкнулся с проблемой. «
  • «Microsoft Access Error 3146 не может быть найден. «
  • «Microsoft Access Error 3146 не найден.»
  • «Ошибка запуска программы: Microsoft Access Error 3146.»
  • «Microsoft Access Error 3146 не работает. «
  • «Ошибка Microsoft Access Error 3146. «
  • «Неверный путь к программе: Microsoft Access Error 3146. «

Обычно ошибки Microsoft Access Error 3146 с Microsoft Access возникают во время запуска или завершения работы, в то время как программы, связанные с Microsoft Access Error 3146, выполняются, или редко во время последовательности обновления ОС. Важно отметить, когда возникают проблемы Microsoft Access Error 3146, так как это помогает устранять проблемы Microsoft Access (и сообщать в Microsoft Corporation).

Создатели Microsoft Access Error 3146 Трудности

Заражение вредоносными программами, недопустимые записи реестра Microsoft Access или отсутствующие или поврежденные файлы Microsoft Access Error 3146 могут создать эти ошибки Microsoft Access Error 3146.

В частности, проблемы Microsoft Access Error 3146 возникают через:

  • Недопустимая или поврежденная запись Microsoft Access Error 3146.
  • Вредоносные программы заразили Microsoft Access Error 3146, создавая повреждение.
  • Другая программа (не связанная с Microsoft Access) удалила Microsoft Access Error 3146 злонамеренно или по ошибке.
  • Другая программа, конфликтующая с Microsoft Access Error 3146 или другой общей ссылкой Microsoft Access.
  • Microsoft Access (Microsoft Access Error 3146) поврежден во время загрузки или установки.

Продукт Solvusoft

Загрузка
WinThruster 2022 — Проверьте свой компьютер на наличие ошибок.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

  • Remove From My Forums
  • Вопрос

  • 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.

Ответы

  • 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.

    • Помечено в качестве ответа

      13 июля 2011 г. 7:41

  • Home
  • VBForums
  • Visual Basic
  • Office Development
  • RUNTIME ERROR ‘3146’..ODBC-Call Failed

  1. May 9th, 2005, 11:41 PM

    #1

    nagasrikanth is offline

    Thread Starter


    Hyperactive Member

    nagasrikanth's Avatar


    Lightbulb RUNTIME ERROR ‘3146’..ODBC-Call Failed

    Hi..

    Im using SQL server as my backend and MS Access as F.E..

    Im using to update around 10 to 20 records one by one by upto 2 to 3 records it was updating, later for 4th record it was saying «RUNTIME ERROR ‘3146’..ODBC-Call Failed»(at «rst.update» it was showing)
    ..at that time if i start agian from «rst.addnew» then for upto 3 to 4 it was okay..Is there any limitation in adding records.???
    FYI: Im not getting if i update 1 or 2 records..and
    one more thing that i came to know was ,If the table was a ordinary Access Table..Im not getting any error..
    One more thing was If i place some time delay using msgbox (like msgbox «Updated…» for example)that means for each record I placed a message updated..then it was working perfectly on to my surprise..

    Please help me in this regard..Please..

    Thanks & regards
    Anu…


  2. May 9th, 2005, 11:46 PM

    #2

    Re: RUNTIME ERROR ‘3146’..ODBC-Call Failed

    Sounds like your updating/adding records through Access tables/queries and not directly to the SQL tables? Alos, probably
    using a recordset to add/update when you could execute a sql INSERT statement or an sql UPDATE statement.

    Recordsets are slow. You can create a connection to SQL using ADO, DAO, ODBC to perform your actions.

    VB/Office Guru� (AKA: Gangsta Yoda)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum. Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru� Word SpellChecker�.NETVB/Office Guru� Word SpellChecker� VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24″ LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6


  3. May 9th, 2005, 11:59 PM

    #3

    nagasrikanth is offline

    Thread Starter


    Hyperactive Member

    nagasrikanth's Avatar


    Lightbulb Re: RUNTIME ERROR ‘3146’..ODBC-Call Failed

    Hi Rob,
    Thanx for u r quick reply..
    But Im using SQL tables it self,(Sql tables are linked in my database..)
    and whenever i want to insert new records im opening a connection using
    set rst=currentdb.openrecordset(sql string…….)
    and im inserting a new row by using AddNew and Update methods (not by using sql Queries)

    What i have to do speed up my recordset..Please help..

    Thanx & Regards
    Srikanth


  4. May 10th, 2005, 12:09 AM

    #4

    Re: RUNTIME ERROR ‘3146’..ODBC-Call Failed

    The slowness is from Access having to connect its linked ODBC connection to your SQL db/table via a rs. You could
    execute a statement like so.

    VB Code:

    1. Dim lRecs As Long

    2.     Access.CurrentDb.Connection.Execute "INSERT INTO Table1 VALUES('Testing')", lRecs

    3.     MsgBox lRecs & " records added", vbOKOnly + vbInformation

    VB/Office Guru� (AKA: Gangsta Yoda)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum. Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru� Word SpellChecker�.NETVB/Office Guru� Word SpellChecker� VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24″ LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6


  • Home
  • VBForums
  • Visual Basic
  • Office Development
  • RUNTIME ERROR ‘3146’..ODBC-Call Failed


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules


Click Here to Expand Forum to Full Width

Question & Answer

Question

Using Microsoft® Access 97 and getting «ODBC—call failed (error 3146)» error message. However, in a DB2® CLI trace, you see the error to be «[IBM][CLI Driver][DB2] SQL0180N The syntax of the string representation of a datetime value is incorrect. SQLSTATE=22007».

Cause

The problem is that Microsoft Access is using SQL_C_DEFAULT instead of providing an actual data type during the SQLBindParameter() call. The SQL_C_DEFAULT data format for SQL_TYPE_TIME is a SQL_C_TYPE_TIME data structure. The SQL_C_DEFAULT data format for SQL_TYPE_TIMESTAMP is a SQL_C_TYPE_TIMESTAMP data structure. The SQL_C_DEFAULT data format for SQL_TYPE_DATE is a SQL_C_TYPE_DATE data structure

However, the buffers Microsoft Access gives DB2 contain SQL_C_CHAR data, i.e. ASCII data.

If you refer to ODBC Specification:

http://msdn2.microsoft.com/en-us/library/ms131462(SQL.100).aspx

you can see that the table clearly shows that when SQL_C_DEFAULT is provided for a
SQL_TYPE_TIME column, a SQL_C_TYPE_TIME structure is assumed; that when SQL_C_DEFAULT is provided for a SQL_TYPE_TIMESTAMP column, a SQL_C_TYPE_TIMESTAMP structure is assumed; and that when SQL_C_DEFAULT is provided for a SQL_TYPE_DATE column, a SQL_C_TYPE_DATE structure is assumed. These structures have the following definitions:

http://msdn2.microsoft.com/en-us/library/ms714556.aspx

e.g. struct tagTIME_STRUCT {
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
} TIME_STRUCT;[a]

This is not a DB2 issue, but may be a Microsoft Access issue since these structures do not contain ASCII character data. However, DB2 has a workaround to satisfy IBM DB2 customers.

Answer

The following CLI Configuration Keywords were added to DB2 v8.1 fixpack 4 as a workaround (depending on the data type of concern):

MapTimeDescribe=1
MapTimeStampDescribe=1
MapDateDescribe=1

=============================================================================

For DB2 v7.2 customers:

This works in DB2 v7.2 because Microsoft Access gives DB2 a SQLType of SQL_CHAR during the SQLBindParameter() call. As such, DB2 will read SQL_C_CHAR data from the application specified buffer.

[{«Product»:{«code»:»SSEPGG»,»label»:»Db2 for Linux, UNIX and Windows»},»Business Unit»:{«code»:»BU058″,»label»:»IBM Infrastructure w/TPS»},»Component»:»Programming Interface — CLI»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»9.5;9.1;8″,»Edition»:»All Editions»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]

  • Remove From My Forums
  • Question

  • All

    We have a Pervasive SQL server on which I try to make an ODBC-connection.  I have code below.  It fails on the last line with message runtime error 3146: ODBC-call failed.  The Pervasive ODBC Client is installed and the name of server and
    database is correct.  If I use the import ODBC-function in Access, it works as expected but I must link it by using VBA.

     Set db = CurrentDb
        Set td = db.TableDefs(strTable)
        If Err.Number <> 0 Then
            Set td = db.CreateTableDef(strTable)
            td.Connect = «ODBC;Driver={Pervasive ODBC Client Interface};ServerName=svPSQL;dbq=@Purch»
            td.SourceTableName = strTable
            db.TableDefs.Append td

    End If

Answers

  • I found the issue, the connection string has to be:

    td.Connect = «ODBC;Driver={Pervasive ODBC Interface};ServerName=svPSQL;dbq=@Purch»

    • Marked as answer by

      Tuesday, June 23, 2020 9:20 AM

  • Remove From My Forums
  • 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.

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

      Wednesday, July 13, 2011 7:41 AM

How to fix the Runtime Code 3146 Microsoft Access Error 3146

This article features error number Code 3146, commonly known as Microsoft Access Error 3146 described as ODBC—call failed.

About Runtime Code 3146

Runtime Code 3146 happens when Microsoft Access fails or crashes whilst it’s running, hence its name. It doesn’t necessarily mean that the code was corrupt in some way, but just that it did not work during its run-time. This kind of error will appear as an annoying notification on your screen unless handled and corrected. Here are symptoms, causes and ways to troubleshoot the problem.

Definitions (Beta)

Here we list some definitions for the words contained in your error, in an attempt to help you understand your problem. This is a work in progress, so sometimes we might define the word incorrectly, so feel free to skip this section!

  • Access — DO NOT USE this tag for Microsoft Access, use [ms-access] instead
  • Call — A Call is the action of invoking a subroutine of code, an external program or a script in a programming environment
  • Odbc — Open Database Connectivity ODBC provides a standard software interface for accessing database management systems DBMS.
  • Access — Microsoft Access, also known as Microsoft Office Access, is a database management system from Microsoft that commonly combines the relational Microsoft JetACE Database Engine with a graphical user interface and software-development tools
  • Microsoft access — Microsoft Access, also known as Microsoft Office Access, is a database management system from Microsoft that commonly combines the relational Microsoft JetACE Database Engine with a graphical user interface and software-development tools
Symptoms of Code 3146 — Microsoft Access Error 3146

Runtime errors happen without warning. The error message can come up the screen anytime Microsoft Access is run. In fact, the error message or some other dialogue box can come up again and again if not addressed early on.

There may be instances of files deletion or new files appearing. Though this symptom is largely due to virus infection, it can be attributed as a symptom for runtime error, as virus infection is one of the causes for runtime error. User may also experience a sudden drop in internet connection speed, yet again, this is not always the case.

Fix Microsoft Access Error 3146 (Error Code 3146)
(For illustrative purposes only)

Causes of Microsoft Access Error 3146 — Code 3146

During software design, programmers code anticipating the occurrence of errors. However, there are no perfect designs, as errors can be expected even with the best program design. Glitches can happen during runtime if a certain error is not experienced and addressed during design and testing.

Runtime errors are generally caused by incompatible programs running at the same time. It may also occur because of memory problem, a bad graphics driver or virus infection. Whatever the case may be, the problem must be resolved immediately to avoid further problems. Here are ways to remedy the error.

Repair Methods

Runtime errors may be annoying and persistent, but it is not totally hopeless, repairs are available. Here are ways to do it.

If a repair method works for you, please click the upvote button to the left of the answer, this will let other users know which repair method is currently working the best.

Please note: Neither ErrorVault.com nor it’s writers claim responsibility for the results of the actions taken from employing any of the repair methods listed on this page — you complete these steps at your own risk.

Method 1 — Close Conflicting Programs

When you get a runtime error, keep in mind that it is happening due to programs that are conflicting with each other. The first thing you can do to resolve the problem is to stop these conflicting programs.

  • Open Task Manager by clicking Ctrl-Alt-Del at the same time. This will let you see the list of programs currently running.
  • Go to the Processes tab and stop the programs one by one by highlighting each program and clicking the End Process buttom.
  • You will need to observe if the error message will reoccur each time you stop a process.
  • Once you get to identify which program is causing the error, you may go ahead with the next troubleshooting step, reinstalling the application.

Method 2 — Update / Reinstall Conflicting Programs

Using Control Panel

  • For Windows 7, click the Start Button, then click Control panel, then Uninstall a program
  • For Windows 8, click the Start Button, then scroll down and click More Settings, then click Control panel > Uninstall a program.
  • For Windows 10, just type Control Panel on the search box and click the result, then click Uninstall a program
  • Once inside Programs and Features, click the problem program and click Update or Uninstall.
  • If you chose to update, then you will just need to follow the prompt to complete the process, however if you chose to Uninstall, you will follow the prompt to uninstall and then re-download or use the application’s installation disk to reinstall the program.

Using Other Methods

  • For Windows 7, you may find the list of all installed programs when you click Start and scroll your mouse over the list that appear on the tab. You may see on that list utility for uninstalling the program. You may go ahead and uninstall using utilities available in this tab.
  • For Windows 10, you may click Start, then Settings, then choose Apps.
  • Scroll down to see the list of Apps and features installed in your computer.
  • Click the Program which is causing the runtime error, then you may choose to uninstall or click Advanced options to reset the application.

Method 3 — Update your Virus protection program or download and install the latest Windows Update

Virus infection causing runtime error on your computer must immediately be prevented, quarantined or deleted. Make sure you update your virus program and run a thorough scan of the computer or, run Windows update so you can get the latest virus definition and fix.

Method 4 — Re-install Runtime Libraries

You might be getting the error because of an update, like the MS Visual C++ package which might not be installed properly or completely. What you can do then is to uninstall the current package and install a fresh copy.

  • Uninstall the package by going to Programs and Features, find and highlight the Microsoft Visual C++ Redistributable Package.
  • Click Uninstall on top of the list, and when it is done, reboot your computer.
  • Download the latest redistributable package from Microsoft then install it.

Method 5 — Run Disk Cleanup

You might also be experiencing runtime error because of a very low free space on your computer.

  • You should consider backing up your files and freeing up space on your hard drive
  • You can also clear your cache and reboot your computer
  • You can also run Disk Cleanup, open your explorer window and right click your main directory (this is usually C: )
  • Click Properties and then click Disk Cleanup

Method 6 — Reinstall Your Graphics Driver

If the error is related to a bad graphics driver, then you may do the following:

  • Open your Device Manager, locate the graphics driver
  • Right click the video card driver then click uninstall, then restart your computer

Method 7 — IE related Runtime Error

If the error you are getting is related to the Internet Explorer, you may do the following:

  1. Reset your browser.
    • For Windows 7, you may click Start, go to Control Panel, then click Internet Options on the left side. Then you can click Advanced tab then click the Reset button.
    • For Windows 8 and 10, you may click search and type Internet Options, then go to Advanced tab and click Reset.
  2. Disable script debugging and error notifications.
    • On the same Internet Options window, you may go to Advanced tab and look for Disable script debugging
    • Put a check mark on the radio button
    • At the same time, uncheck the «Display a Notification about every Script Error» item and then click Apply and OK, then reboot your computer.

If these quick fixes do not work, you can always backup files and run repair reinstall on your computer. However, you can do that later when the solutions listed here did not do the job.

Other languages:

Wie beheben Fehler 3146 (Microsoft Access-Fehler 3146) — ODBC—Aufruf fehlgeschlagen.
Come fissare Errore 3146 (Errore di Microsoft Access 3146) — ODBC: chiamata non riuscita.
Hoe maak je Fout 3146 (Microsoft Access-fout 3146) — ODBC—aanroep mislukt.
Comment réparer Erreur 3146 (Erreur Microsoft Access 3146) — ODBC—l’appel a échoué.
어떻게 고치는 지 오류 3146 (마이크로소프트 액세스 오류 3146) — ODBC—호출에 실패했습니다.
Como corrigir o Erro 3146 (Erro 3146 do Microsoft Access) — ODBC — falha na chamada.
Hur man åtgärdar Fel 3146 (Microsoft Access-fel 3146) — ODBC-samtal misslyckades.
Как исправить Ошибка 3146 (Ошибка Microsoft Access 3146) — ODBC — вызов не удался.
Jak naprawić Błąd 3146 (Błąd Microsoft Access 3146) — ODBC — wywołanie nie powiodło się.
Cómo arreglar Error 3146 (Error 3146 de Microsoft Access) — ODBC: la llamada falló.

The Author About The Author: Phil Hart has been a Microsoft Community Contributor since 2010. With a current point score over 100,000, they’ve contributed more than 3000 answers in the Microsoft Support forums and have created almost 200 new help articles in the Technet Wiki.

Follow Us: Facebook Youtube Twitter

Last Updated:

24/05/22 01:21 : A Android user voted that repair method 1 worked for them.

Recommended Repair Tool:

This repair tool can fix common computer problems such as blue screens, crashes and freezes, missing DLL files, as well as repair malware/virus damage and more by replacing damaged and missing system files.

STEP 1:

Click Here to Download and install the Windows repair tool.

STEP 2:

Click on Start Scan and let it analyze your device.

STEP 3:

Click on Repair All to fix all of the issues it detected.

DOWNLOAD NOW

Compatibility

Requirements

1 Ghz CPU, 512 MB RAM, 40 GB HDD
This download offers unlimited scans of your Windows PC for free. Full system repairs start at $19.95.

Article ID: ACX06523EN

Applies To: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000

Speed Up Tip #78

Increasing the Cluster Size on NTFS:

To help speed up the opening of files, you can increase the cluster size of NTFS to 16K or 32K from the usual 4K. This is specifically beneficial for advanced users who store large files in a particular partition.

Click Here for another way to speed up your Windows PC

My client is using Access 2010 as a front end to a SQL Server 2012 Express database. When they try to add a record they get the error ‘3146ODBC — called failed’. I have looked on line fro solutions to this problem and they refer to older versions on
Access and SQL. My client is on Windows 7.

The code for adding a record is below. What should I look for wint Access 2010, SQL Server 2012 Express on Windows 7?

Option Compare Database
Option Explicit
Function LoadData()
Dim RecSet As DAO.Recordset
Dim objXLAppln As Excel.Application
Dim objWBook As Excel.Workbook
Dim StrPathFile As String, strFile As String, strPath As String
Dim strBrowseMsg As String, strInitialDirectory As String, strFilter As String
'show dialogue box
strBrowseMsg = "Select the EXCEL file:"
'set directory to load files from
strInitialDirectory = "C:Bridge_CIP_Part-A_B"
'run strFilter function
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xlsx)", "*.xlsx")
StrPathFile = ahtCommonFileOpenSave(InitialDir:=strInitialDirectory, _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:=strBrowseMsg, _
Flags:=ahtOFN_HIDEREADONLY)
If StrPathFile = "" Then
MsgBox "No file was selected.", vbOK, "No Selection"
Exit Function
End If
'Set Excel application object. Critical for macro to run properly. Do not change.
Set objXLAppln = New Excel.Application
'Open workbook and worksheet to load data.
With objXLAppln
Set objWBook = .Workbooks.Open(StrPathFile)
End With
Set RecSet = CurrentDb.OpenRecordset("Part_A-B")
'Copy data from Excel cells to Access fields
objXLAppln.Sheets("Main_Tab").Select
objXLAppln.Range("A3").Select
With RecSet
RecSet.AddNew
RecSet.Fields("CIP_ID").value = objXLAppln.ActiveCell.Offset(1, 1).value
RecSet.Fields("ProjectName").value = objXLAppln.ActiveCell.Offset(1, 3).value
RecSet.Fields("BundledID").value = objXLAppln.ActiveCell.Offset(1, 5).value
RecSet.Fields("BridgeComplex01Name").value = objXLAppln.ActiveCell.Offset(3, 1).value
RecSet.Fields("BridgeComplex02Name").value = objXLAppln.ActiveCell.Offset(3, 3).value
RecSet.Fields("BridgeComplex03Name").value = objXLAppln.ActiveCell.Offset(3, 5).value
RecSet.Fields("BridgeName01").value = objXLAppln.ActiveCell.Offset(5, 1).value
RecSet.Fields("BridgeNumber01").value = objXLAppln.ActiveCell.Offset(5, 3).value
RecSet.Fields("BridgeLocation01").value = objXLAppln.ActiveCell.Offset(5, 5).value
RecSet.Fields("BridgeName02").value = objXLAppln.ActiveCell.Offset(7, 1).value
RecSet.Fields("BridgeNumber02").value = objXLAppln.ActiveCell.Offset(7, 3).value
RecSet.Fields("BridgeLocation02").value = objXLAppln.ActiveCell.Offset(7, 5).value
RecSet.Fields("BridgeName03").value = objXLAppln.ActiveCell.Offset(9, 1).value
RecSet.Fields("BridgeNumber03").value = objXLAppln.ActiveCell.Offset(9, 3).value
RecSet.Fields("BridgeLocation03").value = objXLAppln.ActiveCell.Offset(9, 5).value
RecSet.Fields("BridgeName04").value = objXLAppln.ActiveCell.Offset(11, 1).value
RecSet.Fields("BridgeNumber04").value = objXLAppln.ActiveCell.Offset(11, 3).value
RecSet.Fields("BridgeLocation04").value = objXLAppln.ActiveCell.Offset(11, 5).value
RecSet.Fields("BridgeName05").value = objXLAppln.ActiveCell.Offset(13, 1).value
RecSet.Fields("BridgeNumber05").value = objXLAppln.ActiveCell.Offset(13, 3).value
RecSet.Fields("BridgeLocation05").value = objXLAppln.ActiveCell.Offset(13, 5).value
RecSet.Fields("BridgeName06").value = objXLAppln.ActiveCell.Offset(15, 1).value
RecSet.Fields("BridgeNumber06").value = objXLAppln.ActiveCell.Offset(15, 3).value
RecSet.Fields("BridgeLocation06").value = objXLAppln.ActiveCell.Offset(15, 5).value
RecSet.Fields("BridgeName07").value = objXLAppln.ActiveCell.Offset(17, 1).value
RecSet.Fields("BridgeNumber07").value = objXLAppln.ActiveCell.Offset(17, 3).value
RecSet.Fields("BridgeLocation07").value = objXLAppln.ActiveCell.Offset(17, 5).value
RecSet.Fields("BridgeName08").value = objXLAppln.ActiveCell.Offset(19, 1).value
RecSet.Fields("BridgeNumber08").value = objXLAppln.ActiveCell.Offset(19, 3).value
RecSet.Fields("BridgeLocation08").value = objXLAppln.ActiveCell.Offset(19, 5).value
RecSet.Fields("WorkCategory").value = objXLAppln.ActiveCell.Offset(21, 5).value
RecSet.Fields("ProblemDefinition").value = objXLAppln.ActiveCell.Offset(24, 0).value
RecSet.Fields("ProposedSolution").value = objXLAppln.ActiveCell.Offset(27, 0).value
RecSet.Fields("ProjectJustification").value = objXLAppln.ActiveCell.Offset(30, 0).value
RecSet.Fields("Initial_CV_Sub").value = objXLAppln.ActiveCell.Offset(59, 5).value
RecSet.Fields("RightOfWay").value = objXLAppln.ActiveCell.Offset(65, 3).value
RecSet.Fields("Utilities").value = objXLAppln.ActiveCell.Offset(70, 3).value
RecSet.Fields("OccProb5").value = objXLAppln.ActiveCell.Offset(75, 1).value
RecSet.Fields("OccProb10").value = objXLAppln.ActiveCell.Offset(75, 2).value
RecSet.Fields("OccProb15").value = objXLAppln.ActiveCell.Offset(75, 3).value
RecSet.Fields("OccProb20").value = objXLAppln.ActiveCell.Offset(75, 4).value
RecSet.Fields("CostRisk5").value = objXLAppln.ActiveCell.Offset(77, 1).value
RecSet.Fields("CostRisk10").value = objXLAppln.ActiveCell.Offset(77, 2).value
RecSet.Fields("CostRisk15").value = objXLAppln.ActiveCell.Offset(77, 3).value
RecSet.Fields("CostRisk20").value = objXLAppln.ActiveCell.Offset(77, 4).value
RecSet.Fields("CostChange5").value = objXLAppln.ActiveCell.Offset(80, 1).value
RecSet.Fields("CostChange10").value = objXLAppln.ActiveCell.Offset(80, 2).value
RecSet.Fields("CostChange15").value = objXLAppln.ActiveCell.Offset(80, 3).value
RecSet.Fields("CostChange20").value = objXLAppln.ActiveCell.Offset(80, 4).value
RecSet.Fields("IndirectCost5").value = objXLAppln.ActiveCell.Offset(84, 1).value
RecSet.Fields("IndirectCost10").value = objXLAppln.ActiveCell.Offset(84, 2).value
RecSet.Fields("IndirectCost15").value = objXLAppln.ActiveCell.Offset(84, 3).value
RecSet.Fields("IndirectCost20").value = objXLAppln.ActiveCell.Offset(84, 4).value
RecSet.Fields("MOBaseScore").value = objXLAppln.ActiveCell.Offset(91, 1).value
RecSet.Fields("MOScore5").value = objXLAppln.ActiveCell.Offset(91, 2).value
RecSet.Fields("MOScore10").value = objXLAppln.ActiveCell.Offset(91, 3).value
RecSet.Fields("MOScore15").value = objXLAppln.ActiveCell.Offset(91, 4).value
RecSet.Fields("MOScore20").value = objXLAppln.ActiveCell.Offset(91, 5).value
RecSet.Fields("RABaseScore").value = objXLAppln.ActiveCell.Offset(92, 1).value
RecSet.Fields("RAScore5").value = objXLAppln.ActiveCell.Offset(92, 2).value
RecSet.Fields("RAScore10").value = objXLAppln.ActiveCell.Offset(92, 3).value
RecSet.Fields("RAScore15").value = objXLAppln.ActiveCell.Offset(92, 4).value
RecSet.Fields("RAScore20").value = objXLAppln.ActiveCell.Offset(92, 5).value
RecSet.Fields("SIBaseScore").value = objXLAppln.ActiveCell.Offset(93, 1).value
RecSet.Fields("SIScore5").value = objXLAppln.ActiveCell.Offset(93, 2).value
RecSet.Fields("SIScore10").value = objXLAppln.ActiveCell.Offset(93, 3).value
RecSet.Fields("SIScore15").value = objXLAppln.ActiveCell.Offset(93, 4).value
RecSet.Fields("SIScore20").value = objXLAppln.ActiveCell.Offset(93, 5).value
RecSet.Fields("EPBaseScore").value = objXLAppln.ActiveCell.Offset(94, 1).value
RecSet.Fields("EPScore5").value = objXLAppln.ActiveCell.Offset(94, 2).value
RecSet.Fields("EPScore10").value = objXLAppln.ActiveCell.Offset(94, 3).value
RecSet.Fields("EPScore15").value = objXLAppln.ActiveCell.Offset(94, 4).value
RecSet.Fields("EPScore20").value = objXLAppln.ActiveCell.Offset(94, 5).value
RecSet.Fields("MaintBaseScore").value = objXLAppln.ActiveCell.Offset(95, 1).value
RecSet.Fields("MaintScore5").value = objXLAppln.ActiveCell.Offset(95, 2).value
RecSet.Fields("MaintScore10").value = objXLAppln.ActiveCell.Offset(95, 3).value
RecSet.Fields("MaintScore15").value = objXLAppln.ActiveCell.Offset(95, 4).value
RecSet.Fields("MaintScore20").value = objXLAppln.ActiveCell.Offset(95, 5).value
RecSet.Fields("USBaseScore").value = objXLAppln.ActiveCell.Offset(96, 1).value
RecSet.Fields("USScore5").value = objXLAppln.ActiveCell.Offset(96, 2).value
RecSet.Fields("USScore10").value = objXLAppln.ActiveCell.Offset(96, 3).value
RecSet.Fields("USScore15").value = objXLAppln.ActiveCell.Offset(96, 4).value
RecSet.Fields("USScore20").value = objXLAppln.ActiveCell.Offset(96, 5).value
RecSet.Fields("LCBaseScore").value = objXLAppln.ActiveCell.Offset(97, 1).value
RecSet.Fields("LCScore5").value = objXLAppln.ActiveCell.Offset(97, 2).value
RecSet.Fields("LCScore10").value = objXLAppln.ActiveCell.Offset(97, 3).value
RecSet.Fields("LCScore15").value = objXLAppln.ActiveCell.Offset(97, 4).value
RecSet.Fields("LCScore20").value = objXLAppln.ActiveCell.Offset(97, 5).value
RecSet.Fields("SJBaseScore").value = objXLAppln.ActiveCell.Offset(98, 1).value
RecSet.Fields("SJScore5").value = objXLAppln.ActiveCell.Offset(98, 2).value
RecSet.Fields("SJScore10").value = objXLAppln.ActiveCell.Offset(98, 3).value
RecSet.Fields("SJScore15").value = objXLAppln.ActiveCell.Offset(98, 4).value
RecSet.Fields("SJScore20").value = objXLAppln.ActiveCell.Offset(98, 5).value
RecSet.Fields("SustBaseScore").value = objXLAppln.ActiveCell.Offset(99, 1).value
RecSet.Fields("SustScore5").value = objXLAppln.ActiveCell.Offset(99, 2).value
RecSet.Fields("SustScore10").value = objXLAppln.ActiveCell.Offset(99, 3).value
RecSet.Fields("SustScore15").value = objXLAppln.ActiveCell.Offset(99, 4).value
RecSet.Fields("SustScore20").value = objXLAppln.ActiveCell.Offset(99, 5).value
RecSet.Fields("TOBaseScore").value = objXLAppln.ActiveCell.Offset(100, 1).value
RecSet.Fields("TOScore5").value = objXLAppln.ActiveCell.Offset(100, 2).value
RecSet.Fields("TOScore10").value = objXLAppln.ActiveCell.Offset(100, 3).value
RecSet.Fields("TOScore15").value = objXLAppln.ActiveCell.Offset(100, 4).value
RecSet.Fields("TOScore20").value = objXLAppln.ActiveCell.Offset(100, 5).value
On Error Resume Next
'Update Access table
RecSet.Update
'check error
Select Case Err.Number
'duplicate key
Case 3022
'cancel add records
RecSet.CancelUpdate
'code to handle other errors
Case Is <> 0
MsgBox Err.Number & "" & Err.Description
End Select
'enable error handling
On Error GoTo 0
End With
' Close table "Part_A-B"
RecSet.Close
' Open table "Notes"
Set RecSet = CurrentDb.OpenRecordset("Notes", dbOpenDynaset, dbSeeChanges)
'Copy data from Excel cells to Access fields
objXLAppln.Sheets("Main_Tab").Select
objXLAppln.Range("A3").Select
With RecSet
RecSet.AddNew
RecSet.Fields("CIP_ID").value = objXLAppln.ActiveCell.Offset(1, 1).value
RecSet.Update
End With
'Close everything
RecSet.Close
objWBook.Close SaveChanges:=False
objXLAppln.Quit
Set RecSet = Nothing
End Function
Icon Ex Номер ошибки: Ошибка 3146
Название ошибки: Microsoft Access Error 3146
Описание ошибки: ODBC—call failed.
Разработчик: Microsoft Corporation
Программное обеспечение: Microsoft Access
Относится к: Windows XP, Vista, 7, 8, 10, 11

Обзор «Microsoft Access Error 3146»

Как правило, практикующие ПК и сотрудники службы поддержки знают «Microsoft Access Error 3146» как форму «ошибки во время выполнения». Когда дело доходит до Microsoft Access, инженеры программного обеспечения используют арсенал инструментов, чтобы попытаться сорвать эти ошибки как можно лучше. К сожалению, многие ошибки могут быть пропущены, что приводит к проблемам, таким как те, с ошибкой 3146.

Некоторые люди могут столкнуться с сообщением «ODBC—call failed.» во время работы программного обеспечения. Сообщение об этой ошибке 3146 позволит разработчикам обновить свое приложение и исправить любые ошибки, которые могут вызвать его. Затем Microsoft Corporation исправит ошибки и подготовит файл обновления для загрузки. Эта ситуация происходит из-за обновления программного обеспечения Microsoft Access является одним из решений ошибок 3146 ошибок и других проблем.

«Microsoft Access Error 3146» чаще всего может возникать при загрузке Microsoft Access. Рассмотрим распространенные причины ошибок ошибки 3146 во время выполнения:

Ошибка 3146 Crash — Ошибка 3146 является хорошо известной, которая происходит, когда неправильная строка кода компилируется в исходный код программы. Это возникает, когда Microsoft Access не реагирует на ввод должным образом или не знает, какой вывод требуется взамен.

Утечка памяти «Microsoft Access Error 3146» — если есть утечка памяти в Microsoft Access, это может привести к тому, что ОС будет выглядеть вялой. Возможные искры включают сбой освобождения, который произошел в программе, отличной от C ++, когда поврежденный код сборки неправильно выполняет бесконечный цикл.

Ошибка 3146 Logic Error — логическая ошибка возникает, когда Microsoft Access производит неправильный вывод из правильного ввода. Когда точность исходного кода Microsoft Corporation низкая, он обычно становится источником ошибок.

Как правило, такие Microsoft Corporation ошибки возникают из-за повреждённых или отсутствующих файлов Microsoft Access Error 3146, а иногда — в результате заражения вредоносным ПО в настоящем или прошлом, что оказало влияние на Microsoft Access. Как правило, решить проблему можно заменой файла Microsoft Corporation. Помимо прочего, в качестве общей меры по профилактике и очистке мы рекомендуем использовать очиститель реестра для очистки любых недопустимых записей файлов, расширений файлов Microsoft Corporation или разделов реестра, что позволит предотвратить появление связанных с ними сообщений об ошибках.

Ошибки Microsoft Access Error 3146

Эти проблемы Microsoft Access, связанные с Microsoft Access Error 3146, включают в себя:

  • «Ошибка программы Microsoft Access Error 3146. «
  • «Недопустимая программа Win32: Microsoft Access Error 3146»
  • «Извините, Microsoft Access Error 3146 столкнулся с проблемой. «
  • «Microsoft Access Error 3146 не может быть найден. «
  • «Microsoft Access Error 3146 не найден.»
  • «Ошибка запуска программы: Microsoft Access Error 3146.»
  • «Microsoft Access Error 3146 не работает. «
  • «Ошибка Microsoft Access Error 3146. «
  • «Неверный путь к программе: Microsoft Access Error 3146. «

Обычно ошибки Microsoft Access Error 3146 с Microsoft Access возникают во время запуска или завершения работы, в то время как программы, связанные с Microsoft Access Error 3146, выполняются, или редко во время последовательности обновления ОС. Важно отметить, когда возникают проблемы Microsoft Access Error 3146, так как это помогает устранять проблемы Microsoft Access (и сообщать в Microsoft Corporation).

Создатели Microsoft Access Error 3146 Трудности

Заражение вредоносными программами, недопустимые записи реестра Microsoft Access или отсутствующие или поврежденные файлы Microsoft Access Error 3146 могут создать эти ошибки Microsoft Access Error 3146.

В частности, проблемы Microsoft Access Error 3146 возникают через:

  • Недопустимая или поврежденная запись Microsoft Access Error 3146.
  • Вредоносные программы заразили Microsoft Access Error 3146, создавая повреждение.
  • Другая программа (не связанная с Microsoft Access) удалила Microsoft Access Error 3146 злонамеренно или по ошибке.
  • Другая программа, конфликтующая с Microsoft Access Error 3146 или другой общей ссылкой Microsoft Access.
  • Microsoft Access (Microsoft Access Error 3146) поврежден во время загрузки или установки.

Продукт Solvusoft

Загрузка
WinThruster 2022 — Проверьте свой компьютер на наличие ошибок.

Совместима с Windows 2000, XP, Vista, 7, 8, 10 и 11

Установить необязательные продукты — WinThruster (Solvusoft) | Лицензия | Политика защиты личных сведений | Условия | Удаление

Question & Answer

Question

Using Microsoft® Access 97 and getting «ODBC—call failed (error 3146)» error message. However, in a DB2® CLI trace, you see the error to be «[IBM][CLI Driver][DB2] SQL0180N The syntax of the string representation of a datetime value is incorrect. SQLSTATE=22007».

Cause

The problem is that Microsoft Access is using SQL_C_DEFAULT instead of providing an actual data type during the SQLBindParameter() call. The SQL_C_DEFAULT data format for SQL_TYPE_TIME is a SQL_C_TYPE_TIME data structure. The SQL_C_DEFAULT data format for SQL_TYPE_TIMESTAMP is a SQL_C_TYPE_TIMESTAMP data structure. The SQL_C_DEFAULT data format for SQL_TYPE_DATE is a SQL_C_TYPE_DATE data structure

However, the buffers Microsoft Access gives DB2 contain SQL_C_CHAR data, i.e. ASCII data.

If you refer to ODBC Specification:

http://msdn2.microsoft.com/en-us/library/ms131462(SQL.100).aspx

you can see that the table clearly shows that when SQL_C_DEFAULT is provided for a
SQL_TYPE_TIME column, a SQL_C_TYPE_TIME structure is assumed; that when SQL_C_DEFAULT is provided for a SQL_TYPE_TIMESTAMP column, a SQL_C_TYPE_TIMESTAMP structure is assumed; and that when SQL_C_DEFAULT is provided for a SQL_TYPE_DATE column, a SQL_C_TYPE_DATE structure is assumed. These structures have the following definitions:

http://msdn2.microsoft.com/en-us/library/ms714556.aspx

e.g. struct tagTIME_STRUCT {
SQLUSMALLINT hour;
SQLUSMALLINT minute;
SQLUSMALLINT second;
} TIME_STRUCT;[a]

This is not a DB2 issue, but may be a Microsoft Access issue since these structures do not contain ASCII character data. However, DB2 has a workaround to satisfy IBM DB2 customers.

Answer

The following CLI Configuration Keywords were added to DB2 v8.1 fixpack 4 as a workaround (depending on the data type of concern):

MapTimeDescribe=1
MapTimeStampDescribe=1
MapDateDescribe=1

=============================================================================

For DB2 v7.2 customers:

This works in DB2 v7.2 because Microsoft Access gives DB2 a SQLType of SQL_CHAR during the SQLBindParameter() call. As such, DB2 will read SQL_C_CHAR data from the application specified buffer.

[{«Product»:{«code»:»SSEPGG»,»label»:»Db2 for Linux, UNIX and Windows»},»Business Unit»:{«code»:»BU058″,»label»:»IBM Infrastructure w/TPS»},»Component»:»Programming Interface — CLI»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»9.5;9.1;8″,»Edition»:»All Editions»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]

hi,

personally I’d do the task completely server side without «moving» 60k x 2 rows back and forth «manually» via 60k OpenRecordSet calls..

this can be simply performed via a JOIN operation which INSERTs missing rows in the target table, similarly to

SET NOCOUNT ON;
USE tempdb;
GO
CREATE TABLE dbo.t1 (
 Id int NOT NULL PRIMARY KEY,
 Data1 varchar(10) NOT NULL,
 Data2 datetime NOT NULL,
 Data3 decimal(18,4) NOT NULL
 );
GO
CREATE TABLE dbo.t2 (
 Id int NOT NULL PRIMARY KEY,
 Data1 varchar(10) NOT NULL,
 Data2 datetime NOT NULL,
 Data3 decimal(18,4) NOT NULL
 );
GO
INSERT INTO dbo.t1
 VALUES (1, ‘a’, ‘2010-01-01’, 1.23),
   (2, ‘b’, ‘2010-01-01’, 1.24),
   (3, ‘c’, ‘2010-01-02’, 1.23),
   (4, ‘d’, ‘2010-02-01’, 1.23);

INSERT INTO dbo.t2
 VALUES (1, ‘a’, ‘2010-01-01’, 1.23),
   (3, ‘c’, ‘2010-01-02’, 1.23);
GO
INSERT INTO dbo.t2
 SELECT t1.Id, t1.Data1, t1.Data2, t1.Data3
  FROM dbo.t1 t1
   LEFT JOIN dbo.t2 t2 ON t2.Id = t1.Id
  WHERE t2.Id IS NULL
 ORDER BY t1.Id;

SELECT *
 FROM dbo.t1 t1
 JOIN dbo.t2 t2 ON t2.Id = t1.Id;

GO
DROP TABLE dbo.t1, dbo.t2;

problems are if your comparison is more than a «simple» ID comparison… think if you have to compare table1{Id=1, Data1=’A’, …} with table2{Id=1, Data1=’B’}… in this case you have to first insert missing rows and then update different rows.. this is
ok, but if you are on SQL Server 2008 you can achieve the complete result via the MERGE statement, which result in the UPSERT well know action, similarly to

SET NOCOUNT ON;
USE tempdb;
GO
CREATE TABLE dbo.t1 (
 Id int NOT NULL PRIMARY KEY,
 Data1 varchar(10) NOT NULL,
 Data2 datetime NOT NULL,
 Data3 decimal(18,4) NOT NULL
 );
GO
CREATE TABLE dbo.t2 (
 Id int NOT NULL PRIMARY KEY,
 Data1 varchar(10) NOT NULL,
 Data2 datetime NOT NULL,
 Data3 decimal(18,4) NOT NULL
 );
GO
INSERT INTO dbo.t1
 VALUES (1, ‘a’, ‘2010-01-01’, 1.23),
   (2, ‘b’, ‘2010-01-01’, 1.24),
   (3, ‘c’, ‘2010-01-02’, 1.23),
   (4, ‘d’, ‘2010-02-01’, 1.23);

INSERT INTO dbo.t2
 VALUES (1, ‘a’, ‘2010-01-01’, 1.23),
   (3, ‘c’, ‘2010-01-02’, 1.23);
GO
INSERT INTO dbo.t2
 SELECT t1.Id, t1.Data1, t1.Data2, t1.Data3
  FROM dbo.t1 t1
   LEFT JOIN dbo.t2 t2 ON t2.Id = t1.Id
  WHERE t2.Id IS NULL
 ORDER BY t1.Id;

SELECT *
 FROM dbo.t1 t1
 JOIN dbo.t2 t2 ON t2.Id = t1.Id;
GO
UPDATE dbo.t1
 SET Data1 = ‘z’
 WHERE Id = 1;

UPDATE dbo.t1
 SET Data1 = ‘y’
 WHERE Id = 2;

UPDATE dbo.t1
 SET Data1 = ‘x’
 WHERE Id = 3;

PRINT ‘show diferences..’ 
SELECT *
 FROM dbo.t1 t1
 JOIN dbo.t2 t2 ON t2.Id = t1.Id;

PRINT ‘updating joined rows..’;
UPDATE dbo.t2
 SET Data1 = t1.Data1,
  Data2 = t1.Data2,
  Data3 = t1.Data3
 FROM dbo.t2 t2
  JOIN dbo.t1 t1 ON t1.Id = t2.Id

SELECT *
 FROM dbo.t1 t1
 JOIN dbo.t2 t2 ON t2.Id = t1.Id;
GO
TRUNCATE TABLE dbo.t1;
TRUNCATE TABLE dbo.t2;
GO
INSERT INTO dbo.t1
 VALUES (1, ‘a’, ‘2010-01-01’, 1.23),
   (2, ‘b’, ‘2010-01-01’, 1.24),
   (3, ‘c’, ‘2010-01-02’, 1.23),
   (4, ‘d’, ‘2010-02-01’, 1.23);

INSERT INTO dbo.t2
 VALUES (1, ‘z’, ‘2010-01-01’, 1.23),
   (3, ‘x’, ‘2010-01-02’, 1.23);

GO
MERGE INTO dbo.t2 AS Target
USING (SELECT Id, Data1, Data2, Data3
  FROM dbo.t1)
       AS Source
ON Target.Id = Source.Id
WHEN MATCHED THEN
 UPDATE SET Data1 = Source.Data1, Data2 = Source.Data2, Data3 = Source.Data3
WHEN NOT MATCHED BY TARGET THEN
 INSERT (Id, Data1, Data2, Data3) VALUES (Source.Id, Source.Data1, Source.Data2, Source.Data3);

SELECT *
 FROM dbo.t1 t1
 LEFT JOIN dbo.t2 t2 ON t2.Id = t1.Id;
GO
DROP TABLE dbo.t1, dbo.t2;

again… this is the way I’d go… straight to the server :)

BTW… «DAO.Database» ??? old fashioned, isn’t it? :)

regards


http://www.asql.biz — DbaMgr2k — DbaMgr and further SQL Tools http://www.hotelsole.com/ — http://www.hotelsolericcione.de

Getting Run Time Error «3146 ODBC connection failed error constantly»? Wants to know why such error coming on your screen Then get solution of this issue read this post.

Well this error might open at any point within database when setup and associated to database on additional PC.  Most common alternative are either faulty network card or SQL will terminate connection after 30 minutes of inactivity for security reasons.

Scenario: I am got a situation where I run a set of reports for different areas. Most of the areas work but I got this error Error (3146) ODBC call failed.

[Oracle][OCBC][Ora]ORA-00600: internal error code, arguments.

Note: if you are receiving error without program and database sitting idle for for than 30 minutes then you must contact IT professional so as to make sure that your network connection is setup and operating properly.

What Causes Run Time Error 3146 Odbc Call Failed Access?

This error 3146 odbc call failed error is because of the misconfigured system files in your windows operating system.

Common Run Time 3146 Error:

Here is the listing of some of the very common Run Time Error 3146 Odbc Call Failed Access that you can get or which are mostly appear on windows based system.

  • «This application failed to start because Run Time Error 3146 Odbc Call Failed Access was not found. Re-installing the application may fix this problem.»
  • «The file Run Time Error 3146 Odbc Call Failed Access is missing.»
  • «Run Time Error 3146 Odbc Call Failed Access not found.»
  • «Run Time Error 3146 Odbc Call Failed Access Access Violation.»
  • «Cannot register Run Time Error 3146 Odbc Call Failed Access.»
  • «Cannot find %PROGFILES64%WIDCOMMBluetooth SoftwareRun Time Error 3146 Odbc Call Failed Access.»
  • «Cannot start Bluetooth Software. A required component is missing: Run Time Error 3146 Odbc Call Failed Access. Please install Bluetooth Software again.»

How To Solve Run Time Error 3146 Odbc Call Failed Access?

  • You can fix this error by updating windows 7 for the latest versions. Click Start button, and kind windows update in search box. After then click windows update as being shown in the picture given below.
  • Make sure that is there is any update available or not. If a windows shows that you have important updates available then please update it in time. Windows update is vital procedure to mend Run Time Error 3146 Odbc Call Failed Access problem.
  • Start your pc and log on as being an administrator.
  • Now go to the start button and then select All Programs> Accessories>System Tools> click to system restore.
  • In this newly opened window select «Restore my computer to a earlier time» option and after then click to the next option.
  • Select the most up dated system restore point from your «For this list, click a restore point» list, and then click Next.
  • Click next in the confirmation window.
  • After completion of the restoration process restart the pc.

Try this workaround this will surely work in fixing off the Run Time Error 3146. 

  • Home
  • VBForums
  • Visual Basic
  • Office Development
  • RUNTIME ERROR ‘3146’..ODBC-Call Failed

  1. May 9th, 2005, 11:41 PM

    #1

    nagasrikanth is offline

    Thread Starter


    Hyperactive Member

    nagasrikanth's Avatar


    Lightbulb RUNTIME ERROR ‘3146’..ODBC-Call Failed

    Hi..

    Im using SQL server as my backend and MS Access as F.E..

    Im using to update around 10 to 20 records one by one by upto 2 to 3 records it was updating, later for 4th record it was saying «RUNTIME ERROR ‘3146’..ODBC-Call Failed»(at «rst.update» it was showing)
    ..at that time if i start agian from «rst.addnew» then for upto 3 to 4 it was okay..Is there any limitation in adding records.???
    FYI: Im not getting if i update 1 or 2 records..and
    one more thing that i came to know was ,If the table was a ordinary Access Table..Im not getting any error..
    One more thing was If i place some time delay using msgbox (like msgbox «Updated…» for example)that means for each record I placed a message updated..then it was working perfectly on to my surprise..

    Please help me in this regard..Please..

    Thanks & regards
    Anu…


  2. May 9th, 2005, 11:46 PM

    #2

    Re: RUNTIME ERROR ‘3146’..ODBC-Call Failed

    Sounds like your updating/adding records through Access tables/queries and not directly to the SQL tables? Alos, probably
    using a recordset to add/update when you could execute a sql INSERT statement or an sql UPDATE statement.

    Recordsets are slow. You can create a connection to SQL using ADO, DAO, ODBC to perform your actions.

    VB/Office Guru� (AKA: Gangsta Yoda)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum. Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru� Word SpellChecker�.NETVB/Office Guru� Word SpellChecker� VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24″ LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6


  3. May 9th, 2005, 11:59 PM

    #3

    nagasrikanth is offline

    Thread Starter


    Hyperactive Member

    nagasrikanth's Avatar


    Lightbulb Re: RUNTIME ERROR ‘3146’..ODBC-Call Failed

    Hi Rob,
    Thanx for u r quick reply..
    But Im using SQL tables it self,(Sql tables are linked in my database..)
    and whenever i want to insert new records im opening a connection using
    set rst=currentdb.openrecordset(sql string…….)
    and im inserting a new row by using AddNew and Update methods (not by using sql Queries)

    What i have to do speed up my recordset..Please help..

    Thanx & Regards
    Srikanth


  4. May 10th, 2005, 12:09 AM

    #4

    Re: RUNTIME ERROR ‘3146’..ODBC-Call Failed

    The slowness is from Access having to connect its linked ODBC connection to your SQL db/table via a rs. You could
    execute a statement like so.

    VB Code:

    1. Dim lRecs As Long

    2.     Access.CurrentDb.Connection.Execute "INSERT INTO Table1 VALUES('Testing')", lRecs

    3.     MsgBox lRecs & " records added", vbOKOnly + vbInformation

    VB/Office Guru� (AKA: Gangsta Yoda)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum. Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru� Word SpellChecker�.NETVB/Office Guru� Word SpellChecker� VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24″ LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6


  • Home
  • VBForums
  • Visual Basic
  • Office Development
  • RUNTIME ERROR ‘3146’..ODBC-Call Failed


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules


Click Here to Expand Forum to Full Width

Getting Run Time Error «3146 ODBC connection failed error constantly»? Wants to know why such error coming on your screen Then get solution of this issue read this post.

Well this error might open at any point within database when setup and associated to database on additional PC.  Most common alternative are either faulty network card or SQL will terminate connection after 30 minutes of inactivity for security reasons.

Scenario: I am got a situation where I run a set of reports for different areas. Most of the areas work but I got this error Error (3146) ODBC call failed.

[Oracle][OCBC][Ora]ORA-00600: internal error code, arguments.

Note: if you are receiving error without program and database sitting idle for for than 30 minutes then you must contact IT professional so as to make sure that your network connection is setup and operating properly.

What Causes Run Time Error 3146 Odbc Call Failed Access?

This error 3146 odbc call failed error is because of the misconfigured system files in your windows operating system.

Common Run Time 3146 Error:

Here is the listing of some of the very common Run Time Error 3146 Odbc Call Failed Access that you can get or which are mostly appear on windows based system.

  • «This application failed to start because Run Time Error 3146 Odbc Call Failed Access was not found. Re-installing the application may fix this problem.»
  • «The file Run Time Error 3146 Odbc Call Failed Access is missing.»
  • «Run Time Error 3146 Odbc Call Failed Access not found.»
  • «Run Time Error 3146 Odbc Call Failed Access Access Violation.»
  • «Cannot register Run Time Error 3146 Odbc Call Failed Access.»
  • «Cannot find %PROGFILES64%WIDCOMMBluetooth SoftwareRun Time Error 3146 Odbc Call Failed Access.»
  • «Cannot start Bluetooth Software. A required component is missing: Run Time Error 3146 Odbc Call Failed Access. Please install Bluetooth Software again.»

How To Solve Run Time Error 3146 Odbc Call Failed Access?

  • You can fix this error by updating windows 7 for the latest versions. Click Start button, and kind windows update in search box. After then click windows update as being shown in the picture given below.
  • Make sure that is there is any update available or not. If a windows shows that you have important updates available then please update it in time. Windows update is vital procedure to mend Run Time Error 3146 Odbc Call Failed Access problem.

  • Start your pc and log on as being an administrator.
  • Now go to the start button and then select All Programs> Accessories>System Tools> click to system restore.
  • In this newly opened window select «Restore my computer to a earlier time» option and after then click to the next option.
  • Select the most up dated system restore point from your «For this list, click a restore point» list, and then click Next.
  • Click next in the confirmation window.
  • After completion of the restoration process restart the pc.

Try this workaround this will surely work in fixing off the Run Time Error 3146. 

Hello,
I am trying to call a stored procedure in SQL 2005 from Access 2003 front end.
The code is in Access module, and I have macro called AutoExec to run the code
when the user opens the database.
I am getting the error: «Run-time error 3146 ODBC call failed» password, userid and server are correct.
here is my code
Option Compare Database
Option Explicit
Public Function CompareAD2SQL()

Dim mydb As Database
Dim myq As QueryDef
Dim MyText As String

Set mydb = CurrentDb()
Set myq = mydb.CreateQueryDef(«»)
myq.Connect = «ODBC;DRIVER=SQL;SERVER=;UID=;PWD=;DATABASE=»
myq.ReturnsRecords = False
mydb.QueryTimeout = 4000
myq.ODBCTimeout = 5000
myq.SQL = «exec dbo.compare»
myq.Execute
myq.Close
mydb.Close
End Function

thanks

  • Runtime broker что это windows 10 ошибка
  • Runtime broker ошибка приложения память не может быть read
  • Runtime broker exe системная ошибка
  • Runtime broker exe ошибка приложения
  • Running with rifles ошибка crash dump