В этой статье представлена ошибка с номером Ошибка 3151, известная как Ошибка Microsoft Access 3151, описанная как ODBC — подключение к ‘|’ не смогли.
О программе Runtime Ошибка 3151
Время выполнения Ошибка 3151 происходит, когда Microsoft Access дает сбой или падает во время запуска, отсюда и название. Это не обязательно означает, что код был каким-то образом поврежден, просто он не сработал во время выполнения. Такая ошибка появляется на экране в виде раздражающего уведомления, если ее не устранить. Вот симптомы, причины и способы устранения проблемы.
Определения (Бета)
Здесь мы приводим некоторые определения слов, содержащихся в вашей ошибке, в попытке помочь вам понять вашу проблему. Эта работа продолжается, поэтому иногда мы можем неправильно определить слово, так что не стесняйтесь пропустить этот раздел!
- Доступ — НЕ ИСПОЛЬЗУЙТЕ этот тег для Microsoft Access, используйте вместо него [ms-access].
- Соединение — относится к соединение, используемое для передачи данных между двумя конечными точками, например между клиентом и сетью, базой данных, веб-службой или другим сервером.
- Odbc — Open Database Connectivity ODBC предоставляет стандартное программное обеспечение интерфейс для доступа к СУБД систем управления базами данных.
- Access — Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, которая обычно сочетает в себе реляционное ядро СУБД Microsoft JetACE. с графическим пользовательским интерфейсом и инструментами для разработки программного обеспечения.
- Microsoft Access — Microsoft Access, также известный как Microsoft Office Access, представляет собой систему управления базами данных от Microsoft, которая обычно объединяет реляционную JetACE Database Engine с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
Симптомы Ошибка 3151 — Ошибка Microsoft Access 3151
Ошибки времени выполнения происходят без предупреждения. Сообщение об ошибке может появиться на экране при любом запуске %программы%. Фактически, сообщение об ошибке или другое диалоговое окно может появляться снова и снова, если не принять меры на ранней стадии.
Возможны случаи удаления файлов или появления новых файлов. Хотя этот симптом в основном связан с заражением вирусом, его можно отнести к симптомам ошибки времени выполнения, поскольку заражение вирусом является одной из причин ошибки времени выполнения. Пользователь также может столкнуться с внезапным падением скорости интернет-соединения, но, опять же, это не всегда так.
(Только для примера)
Причины Ошибка Microsoft Access 3151 — Ошибка 3151
При разработке программного обеспечения программисты составляют код, предвидя возникновение ошибок. Однако идеальных проектов не бывает, поскольку ошибки можно ожидать даже при самом лучшем дизайне программы. Глюки могут произойти во время выполнения программы, если определенная ошибка не была обнаружена и устранена во время проектирования и тестирования.
Ошибки во время выполнения обычно вызваны несовместимостью программ, запущенных в одно и то же время. Они также могут возникать из-за проблем с памятью, плохого графического драйвера или заражения вирусом. Каким бы ни был случай, проблему необходимо решить немедленно, чтобы избежать дальнейших проблем. Ниже приведены способы устранения ошибки.
Методы исправления
Ошибки времени выполнения могут быть раздражающими и постоянными, но это не совсем безнадежно, существует возможность ремонта. Вот способы сделать это.
Если метод ремонта вам подошел, пожалуйста, нажмите кнопку 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, вы можете сделать следующее:
- Сбросьте настройки браузера.
- В Windows 7 вы можете нажать «Пуск», перейти в «Панель управления» и нажать «Свойства обозревателя» слева. Затем вы можете перейти на вкладку «Дополнительно» и нажать кнопку «Сброс».
- Для Windows 8 и 10 вы можете нажать «Поиск» и ввести «Свойства обозревателя», затем перейти на вкладку «Дополнительно» и нажать «Сброс».
- Отключить отладку скриптов и уведомления об ошибках.
- В том же окне «Свойства обозревателя» можно перейти на вкладку «Дополнительно» и найти пункт «Отключить отладку сценария».
- Установите флажок в переключателе.
- Одновременно снимите флажок «Отображать уведомление о каждой ошибке сценария», затем нажмите «Применить» и «ОК», затем перезагрузите компьютер.
Если эти быстрые исправления не работают, вы всегда можете сделать резервную копию файлов и запустить восстановление на вашем компьютере. Однако вы можете сделать это позже, когда перечисленные здесь решения не сработают.
Другие языки:
How to fix Error 3151 (Microsoft Access Error 3151) — ODBC—connection to ‘|’ failed.
Wie beheben Fehler 3151 (Microsoft Access-Fehler 3151) — ODBC—Verbindung zu ‘|’ gescheitert.
Come fissare Errore 3151 (Errore di Microsoft Access 3151) — ODBC: connessione a ‘|’ fallito.
Hoe maak je Fout 3151 (Microsoft Access-fout 3151) — ODBC—verbinding met ‘|’ mislukt.
Comment réparer Erreur 3151 (Erreur Microsoft Access 3151) — ODBC—connexion à ‘|’ échoué.
어떻게 고치는 지 오류 3151 (마이크로소프트 액세스 오류 3151) — ODBC—‘|’에 대한 연결 실패한.
Como corrigir o Erro 3151 (Erro 3151 do Microsoft Access) — ODBC — conexão com ‘|’ fracassado.
Hur man åtgärdar Fel 3151 (Microsoft Access-fel 3151) — ODBC-anslutning till ‘|’ misslyckades.
Jak naprawić Błąd 3151 (Błąd Microsoft Access 3151) — ODBC — połączenie z ‘|’ przegrany.
Cómo arreglar Error 3151 (Error de Microsoft Access 3151) — ODBC — conexión a ‘|’ fallido.
Об авторе: Фил Харт является участником сообщества Microsoft с 2010 года. С текущим количеством баллов более 100 000 он внес более 3000 ответов на форумах Microsoft Support и создал почти 200 новых справочных статей в Technet Wiki.
Следуйте за нами:
Последнее обновление:
02/03/22 09:19 : Пользователь Windows 10 проголосовал за то, что метод восстановления 1 работает для него.
Этот инструмент восстановления может устранить такие распространенные проблемы компьютера, как синие экраны, сбои и замораживание, отсутствующие DLL-файлы, а также устранить повреждения от вредоносных программ/вирусов и многое другое путем замены поврежденных и отсутствующих системных файлов.
ШАГ 1:
Нажмите здесь, чтобы скачать и установите средство восстановления Windows.
ШАГ 2:
Нажмите на Start Scan и позвольте ему проанализировать ваше устройство.
ШАГ 3:
Нажмите на Repair All, чтобы устранить все обнаруженные проблемы.
СКАЧАТЬ СЕЙЧАС
Совместимость
Требования
1 Ghz CPU, 512 MB RAM, 40 GB HDD
Эта загрузка предлагает неограниченное бесплатное сканирование ПК с Windows. Полное восстановление системы начинается от $19,95.
ID статьи: ACX06529RU
Применяется к: Windows 10, Windows 8.1, Windows 7, Windows Vista, Windows XP, Windows 2000
Совет по увеличению скорости #84
Обновление до USB 3.0:
Обновите свой компьютер до USB 3.0, если вы все еще используете более старые соединения USB 1.0 или USB 2.0. Скорость передачи данных в десять раз выше, чем у USB 2.0. Вдобавок к этому стандарт USB 3.0 включает другие улучшения, такие как улучшенное использование шины и лучшее управление питанием.
Нажмите здесь, чтобы узнать о другом способе ускорения работы ПК под управлением Windows
-55 / 4 / 0 Регистрация: 10.09.2016 Сообщений: 365 |
|
1 |
|
14.12.2021, 17:56. Показов 478. Ответов 3
Здравствуйте. Работаю в Microsoft Access 2016, Windows 7 64 bit. Получаю сообщение: You are logged on with non-Administrative privileges. System DSNs could not created or modified
__________________
0 |
Eugene-LS 9498 / 4821 / 1176 Регистрация: 05.10.2016 Сообщений: 13,519 Записей в блоге: 1 |
||||
14.12.2021, 18:18 |
2 |
|||
Получаю сообщение Я делал так: Установка драйвера ODBC MySQL: Модуль: Кликните здесь для просмотра всего текста
Achtung! Для ADOX требуются ссылки на библиотеки: Результат может быть таким: Миниатюры
0 |
-55 / 4 / 0 Регистрация: 10.09.2016 Сообщений: 365 |
|
14.12.2021, 19:04 [ТС] |
3 |
Драйвер ODBC MySQL я устновил. Проблема осталась. Миниатюры
0 |
9498 / 4821 / 1176 Регистрация: 05.10.2016 Сообщений: 13,519 Записей в блоге: 1 |
|
14.12.2021, 19:15 |
4 |
Я получил два файла, которые возможно должны мне помочь в установке соединения. Один файл готовых настроек DSN, второй мне не понятен. Видимо вам сюда:
0 |
Synopsis: Let us discuss the ways to troubleshoot Access Runtime Error 3151 also known as ODBC called failed error 3151.
This error occurs in MS Access when the user makes the same ODBC connection with MS Access as MS SQL Server.
Some of the symptoms that you might experience in Access Runtime Error 3151 are:
- The active program window crashes.
- Your PC frequently crashes while running the same program.
- Display Error message-“Microsoft Access Error 3151”.
- Slow Windows Response.
- Slow response to mouse or keyboard input.
- Sudden computer freeze for a few seconds.
Note: You need to keep a track of the time of occurrence of Access Runtime error 3151 like during installation of MS Access or Windows, during windows startup and shutdown. As this will make it easier to fix or troubleshoot Access runtime error 3151.
Causes of Access Runtime Error 3151
Some of the common causes of Access Runtime Error 3151 are:
- Incomplete and Improper installation of MS Access software.
- Corruption caused in Windows registry from a recent Microsoft Access-related software change (install or uninstall).
- Virus or malware infection that has corrupted Windows system files or Microsoft Access-related program files.
- Another program maliciously or mistakenly deleted Microsoft Access-related files.
Ways to troubleshoot MS Access Runtime Error 3151
Just follow the step by step procedure and fix the problem. Let us see what the first method says:-
1. Method to manually resolve Access Error 3151
- Go to the File Tab on the top-left corner and then Click on it.
- Now Click on Get External Data option and then click on Link Tables.
- From the File Type List Select ODBC Database and then click on Machine Data Source option.
- Make a Click on New and Select System Data Source and Click on Next button to continue.
- Enter the ODBC Connection name and the SQL Server name. Click on Next to continue.
- Now, choose the desired database and click on Next and then on Finish.
- Check your ODBC Connection to SQL Server.
- Click on OK button again and again, until SQL Server Log in Page appears.
- Enter the credentials and login details and then click on OK.
2. Virus Scan or Malware scan
This error is displayed when the MS Access files are corrupted. Virus or Malware attack can also cause corrupt files. So, you need to scan for virus and malware with a good antivirus.
3.Use Window System Restore
With this option, you can restore the files back to the state when they were healthy. This will also not affect your data and other files.
4.Install updates related to Windows
For this go to start, button>enter “update” in search box>Windows update dialog box will be displayed> Click on “Install Updates” if updates are present.
5. Uninstall and Reinstall MS Access Program
By doing this you can easily troubleshoot Access Runtime Error 3151.
If these methods are not helpful to you, try using the next method.
6.Professional MS Access Database Recovery Tool
The professional MS Access Database Recovery Tool is designed to repair severely corrupted MDB files which are the main cause of any error in Access Database and therefore it fixes alignment errors and restores the MDB files in the original form.
Conclusion
In this post, I have discussed few methods to troubleshoot Access Runtime Error 3151. The issue can be resolved with the help of manual methods, But,if the error is still unresolved,Then you can use the Professional Access Database Recovery Tool,
Related Post
- Remove From My Forums
-
Question
-
Hi,
I got an error after removed Access database from windows 2000 server to 2008.
My Access version are 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 reference.
But, after do that, I got another error again,
«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.
Answers
-
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
Hi,
I got an error after removed Access database from windows 2000 server to 2008.
My Access version are 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 reference.
But, after do that, I got another error again,
«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.
-
Marked as answer by
Wednesday, December 22, 2010 2:23 AM
-
Marked as answer by
Error Number: | Error 3151 | |
Error Name: | Microsoft Access Error 3151 | |
Error Description: | ODBC—connection to ‘|’ failed. | |
Developer: | Microsoft Corporation | |
Software: | Microsoft Access | |
Applies to: | Windows XP, Vista, 7, 8, 10, 11 |
Microsoft Access Error 3151 Background
It is common for people to refer to Microsoft Access Error 3151 as a runtime error (bug). Developers like Microsoft Corporation usually go through several checkpoints before launching a software program like Microsoft Access. Tragically, problems like error 3151 can be missed, and the software will contain these problems on release.
«ODBC—connection to ‘|’ failed.» might occur to Microsoft Access users even through normal use of the application. When this happens, end-users can inform Microsoft Corporation about the presence of Microsoft Access Error 3151 bugs. Microsoft Corporation can then fix these errors in the source code and prepare an update for download. Consequently, the developer will use a Microsoft Access update package to resolve error 3151 and any other reported error messages.
What Generates Runtime Error 3151?
A problem with Microsoft Access source code will produce this Microsoft Access Error 3151, most often during the startup phase. Here’s the three most common causes why error 3151 runtime errors happen:
Error 3151 Crash — It is called «Error 3151» when a program terminates unexpectedly while running (at runtime). Typically this is the result of Microsoft Access not understanding the input, or not knowing what to output in response.
Microsoft Access Error 3151 Memory Leak — The consequences of a Microsoft Access memory leak involve a malfunctioning operating system. Possible causes include failure of Microsoft Corporation to de-allocate memory in the program, or when bad code is executing an «infinite loop».
Error 3151 Logic Error — You can experience a logic error when the program produces incorrect results even if the user specifies the right value. This is seen when Microsoft Corporation’s source code involves a defect in the input data analysis.
In most cases, Microsoft Access Error 3151 file problems are due to the Microsoft Access-related file missing or being corrupted by malware or virus. As a first troubleshootiong step, most PC professionals will attempt to replace the applicable version of the Microsoft Corporation file. Furthermore, keeping your registry clean and optimized can prevent invalid file path (like Microsoft Access Error 3151) and file extension references, so we recommend running a registry scan cleanup regularly.
Microsoft Access Error 3151 Errors
Microsoft Access Error 3151 Issues Related to Microsoft Access:
- «Microsoft Access Error 3151 Error.»
- «Invalid Win32 Program: Microsoft Access Error 3151»
- «Microsoft Access Error 3151 encountered a problem and will close.»
- «Sorry, we can’t find Microsoft Access Error 3151.»
- «Microsoft Access Error 3151 is missing.»
- «Error starting program: Microsoft Access Error 3151.»
- «Microsoft Access Error 3151 is not running.»
- «Microsoft Access Error 3151 halted.»
- «Software Path Fault: Microsoft Access Error 3151.»
Microsoft Access Microsoft Access Error 3151 issues occur with installation, while Microsoft Access Error 3151-related software runs, during shutdown or startup, or less-likely during operating system updates. It’s important to note when Microsoft Access Error 3151 issues happen, as it helps troubleshoot Microsoft Access problems (and report to Microsoft Corporation).
Origins of Microsoft Access Error 3151 Troubles
Microsoft Access Error 3151 issues are caused by a corrupt or missing Microsoft Access Error 3151, invalid registry keys associated with Microsoft Access, or a malware infection.
More specifically, these Microsoft Access Error 3151 errors can be caused by:
- Invalid (corrupt) Microsoft Access Error 3151 registry entry.
- Malware has infected Microsoft Access Error 3151, creating corruption.
- Microsoft Access Error 3151 maliciously deleted (or mistakenly) by different rogue or valid program.
- Another software in conflict with Microsoft Access, Microsoft Access Error 3151, or shared references.
- Incomplete or corrupt Microsoft Access (Microsoft Access Error 3151) from download or installation.
Product by Solvusoft
Download Now
WinThruster 2022 — Scan your PC for computer errors.
Compatible with Windows 11, 10, 8, 7, Vista, XP and 2000
Optional Offer for WinThruster by Solvusoft | EULA | Privacy Policy | Terms | Uninstall
- Remove From My Forums
-
Question
-
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 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, mosty 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.
We would be very happy if someone could help us to find a solution to this problem.
-
Moved by
Monday, September 27, 2010 7:21 AM
(From:SQL Server Data Access)
Read time 5 minutes
It’s been a while since a common issue raised by many users that they are facing error when they are opening Access Database. The error code is 3151 which is ultimately a result of ODBC connection failure in Access.
According to a user’s query I was going through, he claimed that he recently changed SQL servers with a new name, IP and DSN; he also created a new ODBC and made few changes in link tables. He was successful in updating the tables to the new SQL server, but as soon as he tried to run a form to update territories, he faced this ‘run time error 3151 ODBC connection failed’. The user was using the Access FE application connecting to a BE SQL.
This error happens when the user is using ODBC connection to connect to Microsoft Access; here the ODBC connection is also connected to Microsoft SQL server. The error message pops up is ‘[Microsoft][ODBC Microsoft Access Driver] ODBC–connection to failed’ or DMS-E-GENERAL, A general exception has occurred during operation ‘asynchronous open.’
How to Fix This Issue?
To overcome this issue, you can try the below-mentioned steps and see if it works for you. Open the Access Database and:
- Start with clicking on the File button.
- From the File menu. Select Get External Data and click on Link tables.
- There you will find a File type list, from there select ODBC Database and click on Machine Data Source.
- Here, click on New and select System Data Source. Click on Next to proceed.
- At this stage click on SQL Server option. Click on Next and then click on Finish.
- This is where you enter the details, so enter the ODBC connection and SQL server name in the respective places. Click on Next to proceed.
- Now select the desired Database and click on Next. Click on Finish.
- Now, it is the time when you test the ODBC connection to SQL Server.
- Now, you need to keep clicking the OK button until it takes you back to the SQL server login.
- Finally, enter the login credentials of the SQL server database and click on OK.
So, this is how you can fix this error by following a few simple steps. Error 3151 is quite challenging and most commonly faced error recently, but it is not the only error or issue you may face while using Access. You may also face many other issues one of which is Access Database Corruption, which neither is easy to solve, nor it has many solutions. So, to keep your Access always working and corruption free, you need to keep your Access files healthy. For that, you can figure out the causes for Access Database Corruption and if corruption is already there you can fix it with the help of an automated tool.
What is that Automated Tool We Discussed About?
Kernel for Access Database repair software. It is a third-party solution to repair an Access database file. It instantly solves the corruption issue with Access database files; it can also retrieve permanently deleted data and much more. Let’s see how it works.
- Select an MDB file and click on Open.
- Now, click on the Repair button to proceed.
- Once the repair process is done, have the preview of the file. Click on Save button.
- Provide a destination and name to the recovered file. Click on Save to complete the process.
- The file is repaired and saved successfully.
Video – Easy way to fix the error 3151 in the Access Database
How to Resolve Access Runtime Error 3151 in Windows
Many users prefer saving their confidential files on MS Access Database and it has been used for a very long time. The files remain protected and safe, once they are on MS Access Database. But recently many users are facing Access Runtime Error 3151 on their PCs. This error arises only when the ODBC fails to connect to MS Access.
But let me tell you the whole story behind this error. A user emailed me his query regarding this error. The email quotes:-
“Hello Sir, I have recently changed my SQL Server IP and DSN Name then created a fresh ODBC and made few alterations in the link table. Finally, I succeeded in updating a table into a new SQL Server. But when I tried to update territories, I faced an error. Right now I am using Access FE and was connecting to a BE SQL.”
Well, my friend the basic reason for this error is when the user makes the same ODBC connection with MS Access as MS SQL Server. The chances of popping such error are high in such cases.
Well, that’s all about the Error 3151, but let us see how we can resolve it. There are basically two techniques through which you can deal with this error. The first one is a manual technique and the second is a professional one. If the first technique fails, then only switch to the next one.
I hope the first trick itself can resolve this error. But if it fails, then the only option is left is to try a professional method.
You May Also Read- Common Errors in MS Access Database.
Two Easy Ways to Fix Access Runtime Error 3151
Just follow the step by step procedure and fix the problem. Let us see what the first method says:-
Manual Trick
- Go to the File Tab on the top-left corner and then Click on it.
- Now Click on Get External Data option and then click on Link Tables.
- From the File Type List Select ODBC Database and then click on Machine Data Source option.
- Make a Click on New and Select System Data Source and Click on Next button to continue.
- Enter the ODBC Connection name and the SQL Server name. Click on Next to continue.
- Now, choose the desired database and click on Next and then on Finish.
- Check your ODBC Connection to SQL Server.
- Click on OK button again and again, until SQL Server Log in Page appears.
- Enter the credentials and login details and then click on OK.
This trick will surely fix your error. But MS Access is not restricted to this error only. There are several other errors which are connected to MS Access. The most common reason for such errors is the MS Access Database file corruption. So if you don’t want to face any kind of error, always keep your database file healthy. If you find any issue with the file, then immediately repair the Access Database file.
Manually it is not possible to effectively repair MDB files of Access Database. You have to try a Professional Access Repair Software. If you’ll always keep your MDB Files up to date, then you’ll never face such kinds of error.
Professional MS Access Repair Tool
This professional tool is designed to repair severely corrupted MDB files which are the main cause of any error in Access Database and therefore it fixes alignment errors and restores the MDB files in the original form.
How MS Access Repair Tool Works
- Download and Install the Software into your PC.
- Browse the MDB File and choose the Scanning Mode according to the level of corruption.
- After the completion of the scanning process, all the data of MDB Files will appear in a Tree-Structured format on the left therefore you are free to Select the files you want to save and Click on Save option.
- Select the Location where you want to save the recovered file and then click on OK button.
- Once the whole process completes you’ll receive a Confirmation Message.
This is the whole process of repairing a corrupted MDB file which helps to prevent Access Runtime error 3151. You have this option as well to fix the error.
Summing Up
Well, I have told you how to fix the error. You have various options to fix the error. Either you can try the manual ways or professional ways. So take your decision and opt the best way. I hope by now you can easily fix error 3151.
-
January 22, 2008 at 5:12 pm
#69708
Hi — hope someone can help.
I’ve inherited the maintenance and support of a SQL Server 2000 database with an Access 2000 based front-end, running on an SBS 2003 server. All worked fine up until yesterday when trying to login using the usual username/password gives the above 3151 error. The line in the VB which generates this is:
Set rstRoles = sfdb.OpenRecordset(«Roles», dbOpenDynaset, dbSeeChanges)
which is opening a simple table of roles to check which level the given user is at. Two things:
1 I’ve noticed the transaction log is huge (12 GB) and had just run out of space to grow, but having freed up plenty more disk space, I still get the error
2 I can open the database in admin mode and view the tables as normal. Just can’t run the front end which the users need.
I noticed one post which recommended running the linked tables utlility, which I’ve done but no difference.
Any thoughts or suggestions welcome.:)
-
Minaz Amin
SSChampion
Points: 11052
January 22, 2008 at 11:22 pm
#770751
Is it possible to post the SQL Server error message.
Please go to the LOG folder of the SQL Server and read the error log without any extension.
«More Green More Oxygen !! Plant a tree today»
-
pete.doyle
SSChasing Mays
Points: 608
January 23, 2008 at 12:46 am
#770765
Hi — thanks for the speedy response — I really appreciate it.
I’ve extracted the error message plus the contents of the last 2 error logs into the attached Word document. I can’t see anything wrong, but hopefully you might!!
Thanks
Pete
-
Minaz Amin
SSChampion
Points: 11052
January 23, 2008 at 1:53 am
#770780
Yes you r right SQl Server is clean. I googled this info.. hope this might help.
http://www.webservertalk.com/message1895352.html
» special this section:to use ADO recordsets instead of DAO recordsets,because DAO seems to be buggy.»
«More Green More Oxygen !! Plant a tree today»
-
SQL ORACLE
One Orange Chip
Points: 27807
January 23, 2008 at 9:10 am
#770960
I believe that you need to test your ODBC connection. It may only work for your system admin account.
Also, regarding the log,
SQL Server is terminating due to ‘stop’ request from service control
there are some discussions in this forum recently. Here is the link,
http://www.sqlservercentral.com/Forums/Topic294789-5-1.aspx
-
pete.doyle
SSChasing Mays
Points: 608
January 23, 2008 at 3:29 pm
#771089
Thanks very much for your replies.
Minaz — I’d seen that too, but my Access help tells me that if I’m using a .mdb database (as I am) then a DAO recordset is returned, with an ADO recordset only returned if it’s an Access project (.adp). So I must already be using DAO surely?
SQL ORACLE — the stop was a manual stop by me to try to kick SQL into action once I’d cleared some space on the C: drive for the transaction log to expand into. There is now 14.3GB free which should be ample.
I get the same SQL error whether I log in as a desktop user connected to the server or as the admin user at the server console.
So am still baffled why it’s suddenly stopped with no error log hints.
Any other ideas anyone??
Pete
-
Key DBA
SSCertifiable
Points: 6029
January 24, 2008 at 6:46 am
#771249
pete.doyle,
You have checked the SQL Errorlog, which can give spotty information at best. You can also check the Windows Event Logs (Application, Security and System) for the same time frames that the SQL Errorlog gives for your connection errors. You will need to check both the Server and the Client(s) to see if any other information is being gathered and reported by Windows.
In case you need it:
(Windows XP and/or Windows Server 2003) START >> Control Panel >> Administrative Tools >> Event Viewer … choose the Type of Log, dig around the logs for the times when the error was caused.
Hopefully you will be able to get more meaningful information.
Keep us posted on your findings.
«Key»
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP -
pete.doyle
SSChasing Mays
Points: 608
January 24, 2008 at 7:13 am
#771264
Thanks Damon — really good input.
I’ve browsed most of the logs looking for anything new that’s been reported between last Friday when it was working and Monday when it wasn’t, but can’t see anything new!!
The only biggie which coincided with all this was the transaction log not being able to expand due to the disk being nearly full. I’d have expected though that as there’s now plenty of space that it should be working OK — but still no joy.
Other ideas??
-
Key DBA
SSCertifiable
Points: 6029
January 24, 2008 at 8:49 am
#771319
I am thinking that there may be a problem with the Access 2000 front end. You seem to have exhausted issues with the SQL Server backend.
These are areas I would investigate if this situation fell into my lap …
(An assumption is made that your VB code is VB6.)
I did a Google search with the following string:
Visual Basic Run-time error 3151 -mysql -oracle -sybase
… This posting *may* be of help …
http://www.xtremevbtalk.com/archive/index.php/t-159130.html
Check your version of ADO. In the VBA code page of the Access project, select TOOLS —> REFERENCES. See what versions of ADO you have installed by seeing what is checked at the top and scrolling down to Microsoft ActiveX Data Objects 2.x — and if you have less than 2.6 go to the Microsoft web site and download the latest ADO. Keep in mind that Microsoft calls the ADO file MDAC.EXE. Download the latest (2.8?) and it won’t hurt to download 2.6, 2.7 too. They can all be installed side-by-side. Just when you save the MDAC.EXE files, rename them with the version (ex. MDAC2-6.EXE).
—
A couple of ideas concerning the Access 2000 Front End.
1) Relink the table connections to SQL Server.
2) MDB Maintenance
Backup the MDB file, just in case. Then Repair then Compact the MDB file. I don’t have any Access 2000 systems, if memory serves Compact and Repair are sperate actions, they are a 2-for-1 with Access 2003.
HTH
«Key»
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP -
pete.doyle
SSChasing Mays
Points: 608
January 25, 2008 at 12:08 am
#771593
Thanks Damon
Did the relinking and compact/repair but no change.
Not sure about the ADO bit you mention — is that relevant if I’m using DAO instead? 🙂
Did a lot of searching of other forums/blogs last night and can’t see anything similar. Also switched on tracing but that didn’t tell me much either. Also rechecked all Windows Server logs from last Friday through to Monday as this feels like a system wide rather than user based error — but apart from the disk space issue, nothing I can see.
My customer is getting very worried…
Pete
-
Key DBA
SSCertifiable
Points: 6029
January 25, 2008 at 6:37 am
#771714
Pete,
There are a lot of things that you have been able to rule out as problems. I have a couple of suggestions below, looking at the issue from a couple of different angles.
VB6:
(Pardon my limited VB knowledge.)
ADO is an acronym for the «ActiveX Data Access» library.
If you are using DAO (Data Access Object) as a connection method in the VB program all I can recommend is to see if you can find anything in VB6 newsgroups/forums/MSDN. If you have access to the source code, you or someone can put it in debug mode and step through the connection process. If you know any VB developers, now would be the time to consider calling in a favor or three.
Connection:
One thing you can try is enabling Tracing with the ODBC Administrator Panel on the database server, and attempt to make a connection from one of the clients, then turn off tracing immediately. You will get a HUGE log file to troll through, but it will give you more information to work with as to what is going on behind the scenes.
As a last resort, you may also want to consider opening a case with Microsoft as well, I realize that it may cost money, but they will be able to help you troubleshoot as well, and have access to tools and knowledge bases that us mere mortals don’t.
Keep me posted
«Key»
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP -
Key DBA
SSCertifiable
Points: 6029
January 25, 2008 at 6:39 am
#771717
Pete,
Just to rule it out, have you run a DBCC CHECKDB against the SQL Server database being used by the application?
«Key»
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP -
pete.doyle
SSChasing Mays
Points: 608
January 25, 2008 at 7:22 am
#771734
Thanks again — and will look closer at suggestion 1. I noticed suggestion 2 on other blogs, but wasn’t clear how to run that???
Pete
-
Key DBA
SSCertifiable
Points: 6029
January 25, 2008 at 7:39 am
#771742
How to make an ODBC TRACE
(Quick and Dirty Draft)
CLIENT:
Get a client machine ready to make the connection …
DATABASE SERVER:
START >> Control Panel >> Administrative Tools >> Data Sources (ODBC) >> Tracing Tab
Log File Path: There is a default path for the log file generated, change as you see fit.
Before you execute the connection on the Client, click the «Start Tracing Now» Button.
… then back to the Client, attempt to make the connection, let it error, and click through any/all errors and such. Once the connection process is completed, back to the Server, you will need to Click the button (I think it gets named to) «Stop Tracing Now». … if you don’t stop the tracing the Trace file will grow until it fills up the hard drive.
I would make a copy of the trace file to work with, chopping out the 99.9% of information you won’t need, with your favorite text editor (I use Textpad as mine). There is a dizzying amount of information captured with this collection process, but you do get to see how connections work «under the hood».
«Key»
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP -
pete.doyle
SSChasing Mays
Points: 608
January 25, 2008 at 7:46 am
#771747
Sorry Damon — was typing in a hurry.
I meant the DBCC CHECKDB bit.
I have done some tracing and couldn’t see anything odd — but will try again as soon as I can get online to the client.
Thanks 🙂
Viewing 15 posts — 1 through 15 (of 20 total)