Runtime error 3051

Ошибка 3051 Ядро базы данных Microsoft Office Access не может открыть или записать в файл '|' ошибки могут привести к зависанию или сбою компьютера, а также к возможному заражению вредоносным ПО. Выполните следующие простые действия, чтобы исправить Runtime Errors ошибки быстро и просто.

Как исправить время выполнения Ошибка 3051 Ядро базы данных Microsoft Office Access не может открыть или записать в файл ‘|’

В этой статье представлена ошибка с номером Ошибка 3051, известная как Ядро базы данных Microsoft Office Access не может открыть или записать в файл ‘|’, описанная как Ядро базы данных Microsoft Office Access не может открыть или записать в файл ‘|’. Он уже открыт исключительно другим пользователем, или вам нужно разрешение на просмотр и запись его данных.

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

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

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

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

  • Access — НЕ ИСПОЛЬЗУЙТЕ этот тег для Microsoft Access, используйте вместо него [ms-access]
  • База данных — база данных организованный набор данных.
  • Файл — блок произвольной информации или ресурс для хранения информации, доступный по строковому имени или пути
  • < b> View — этот тег предназначен для вопросов о представлении базы данных или архитектурном представлении пользовательского интерфейса.
  • Access — Microsoft Access, также известный как Microsoft Office Access, представляет собой средство управления базой данных. система от Microsoft, которая обычно сочетает в себе реляционное ядро ​​СУБД Microsoft JetACE с графическим пользовательским интерфейсом и инструментами разработки программного обеспечения.
  • Разрешение — разрешения определяют операции, которые разрешено выполнять аутентифицированным пользователям. файловые системы, базы данных и другие компьютерные системы.
  • Microsoft office . Microsoft Office — это проприетарный набор настольных приложений, предназначенный для использования специалистами по информационным технологиям на компьютерах Windows и Macintosh < / li>

Симптомы Ошибка 3051 — Ядро базы данных Microsoft Office Access не может открыть или записать в файл ‘|’

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

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

Fix Ядро базы данных Microsoft Office Access не может открыть или записать в файл '|' (Error Ошибка 3051)
(Только для примера)

Причины Ядро базы данных Microsoft Office Access не может открыть или записать в файл ‘|’ — Ошибка 3051

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

How to fix Error 3051 (The Microsoft Office Access database engine cannot open or write to the file ‘|’) — The Microsoft Office Access database engine cannot open or write to the file ‘|’. It is already opened exclusively by another user, or you need permission to view and write its data.
Wie beheben Fehler 3051 (Das Microsoft Office Access-Datenbankmodul kann die Datei ‘|’ nicht öffnen oder schreiben.) — Das Microsoft Office Access-Datenbankmodul kann die Datei ‘|’ nicht öffnen oder in sie schreiben. Es wurde bereits von einem anderen Benutzer exklusiv geöffnet oder Sie benötigen die Berechtigung, seine Daten anzuzeigen und zu schreiben.
Come fissare Errore 3051 (Il motore di database di Microsoft Office Access non può aprire o scrivere nel file ‘|’) — Il motore di database di Microsoft Office Access non può aprire o scrivere nel file ‘|’. È già aperto esclusivamente da un altro utente, oppure è necessaria l’autorizzazione per visualizzare e scrivere i suoi dati.
Hoe maak je Fout 3051 (De Microsoft Office Access-database-engine kan het bestand ‘|’ niet openen of er naar schrijven) — De Microsoft Office Access-database-engine kan het bestand ‘|’ niet openen of ernaar schrijven. Het is al exclusief geopend door een andere gebruiker, of je hebt toestemming nodig om de gegevens te bekijken en te schrijven.
Comment réparer Erreur 3051 (Le moteur de base de données Microsoft Office Access ne peut pas ouvrir ou écrire dans le fichier ‘|’) — Le moteur de base de données Microsoft Office Access ne peut pas ouvrir ou écrire dans le fichier ‘|’. Il est déjà ouvert exclusivement par un autre utilisateur, ou vous avez besoin d’une autorisation pour afficher et écrire ses données.
어떻게 고치는 지 오류 3051 (Microsoft Office Access 데이터베이스 엔진이 ‘|’ 파일을 열거나 쓸 수 없습니다.) — Microsoft Office Access 데이터베이스 엔진이 ‘|’ 파일을 열거나 쓸 수 없습니다. 이미 다른 사용자가 독점적으로 열었거나 해당 데이터를 보고 쓸 수 있는 권한이 필요합니다.
Como corrigir o Erro 3051 (O mecanismo de banco de dados do Microsoft Office Access não pode abrir ou gravar no arquivo ‘|’) — O mecanismo de banco de dados do Microsoft Office Access não pode abrir ou gravar no arquivo ‘|’. Já está aberto exclusivamente por outro usuário, ou você precisa de permissão para visualizar e gravar seus dados.
Hur man åtgärdar Fel 3051 (Microsoft Office Access-databasmotorn kan inte öppna eller skriva till filen ‘|’) — Microsoft Office Access -databasmotorn kan inte öppna eller skriva till filen ‘|’. Den öppnas redan uteslutande av en annan användare, eller så behöver du behörighet för att visa och skriva dess data.
Jak naprawić Błąd 3051 (Aparat bazy danych Microsoft Office Access nie może otwierać ani zapisywać w pliku „|”) — Aparat bazy danych Microsoft Office Access nie może otwierać ani zapisywać w pliku „|”. Jest już otwarty wyłącznie przez innego użytkownika lub potrzebujesz uprawnień do przeglądania i zapisywania jego danych.
Cómo arreglar Error 3051 (El motor de base de datos de Microsoft Office Access no puede abrir o escribir en el archivo ‘|’) — El motor de base de datos de Microsoft Office Access no puede abrir ni escribir en el archivo ‘|’. Ya está abierto exclusivamente por otro usuario, o necesita permiso para ver y escribir sus datos.

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

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

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

31/10/22 12:35 : Пользователь Windows 10 проголосовал за то, что метод восстановления 6 работает для него.

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

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

ШАГ 1:

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

ШАГ 2:

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

ШАГ 3:

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

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

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

Требования

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

ID статьи: ACX011324RU

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

Совет по увеличению скорости #28

Редактирование контекстных меню, вызываемых правой кнопкой мыши:

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

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

Icon Ex Error Number: Error 3051
Error Name: The Microsoft Office Access database engine cannot open or write to the file ‘|’
Error Description: The Microsoft Office Access database engine cannot open or write to the file ‘|’. It is already opened exclusively by another user, or you need permission to view and write its data.
Developer: Microsoft Corporation
Software: Microsoft Access
Applies to: Windows XP, Vista, 7, 8, 10, 11

Explanation of The Microsoft Office Access database engine cannot open or write to the file ‘|’

Experts generally refer to The Microsoft Office Access database engine cannot open or write to the file ‘|’ as a «runtime error». Software developers try to ensure software are free from these glitches until it is publicly released. As much as software developers attempt to prevent it, some minor errors such as error 3051 might not have been found during this phase.

Microsoft Access users can face an error message after execution the program such as «The Microsoft Office Access database engine cannot open or write to the file ‘|’. It is already opened exclusively by another user, or you need permission to view and write its data.». When that occurs, software end-users can inform Microsoft Corporation about the existence of error 3051 bugs. Microsoft Corporation will then have the knowledge to investigate how and where to fix the issue. If there’s a prompt for a Microsoft Access update, it’s usually a workaround for fixing issues like error 3051 and other bugs.

What Triggers Runtime Error 3051?

In the majority of cases you’ll see The Microsoft Office Access database engine cannot open or write to the file ‘|’ during the booting process of Microsoft Access. You can distinguish the causes of processing failures by categorizing error 3051 errors as follows:.

Error 3051 Crash — Error 3051 can lead to total program freeze, which prevents you from doing anything. When Microsoft Access cannot provide sufficient output to the given input, or doesn’t really know what to output, it will often confuse the system in this manner.

The Microsoft Office Access database engine cannot open or write to the file ‘|’ Memory Leak — If there’s a memory leak in Microsoft Access, it may cause the OS to appear sluggish. Potential triggers may be endless looping, which causes the program operation to run over and over again.

Error 3051 Logic Error — A Microsoft Access logic error happens when it produces the wrong output, despite the user providing the correct input. Usual causes of this problem are due to faults in data handling.

Most The Microsoft Office Access database engine cannot open or write to the file ‘|’ errors are the result of a missing or corrupt version of the file installed by Microsoft Access. File replacement is typically the best and easiest way to resolve errors related to Microsoft Corporation files. As a supplemental troubleshooting step, we highly recommend cleaning up any invalid file path and Microsoft Corporation file extension references that could contribute to creating these The Microsoft Office Access database engine cannot open or write to the file ‘|’ error messages.

Common The Microsoft Office Access database engine cannot open or write to the file ‘|’ Issues

Partial List of The Microsoft Office Access database engine cannot open or write to the file ‘|’ Microsoft Access Errors:

  • «Error in Application: The Microsoft Office Access database engine cannot open or write to the file ‘|'»
  • «The Microsoft Office Access database engine cannot open or write to the file ‘|’ not valid.»
  • «Sorry, The Microsoft Office Access database engine cannot open or write to the file ‘|’ encountered a problem.»
  • «The Microsoft Office Access database engine cannot open or write to the file ‘|’ can’t be located.»
  • «The Microsoft Office Access database engine cannot open or write to the file ‘|’ can’t be found.»
  • «Error starting program: The Microsoft Office Access database engine cannot open or write to the file ‘|’.»
  • «Can’t run The Microsoft Office Access database engine cannot open or write to the file ‘|’.»
  • «The Microsoft Office Access database engine cannot open or write to the file ‘|’ quit.»
  • «Faulting Application Path: The Microsoft Office Access database engine cannot open or write to the file ‘|’.»

The Microsoft Office Access database engine cannot open or write to the file ‘|’ EXE errors happen during Microsoft Access installation, while running The Microsoft Office Access database engine cannot open or write to the file ‘|’-related applications (Microsoft Access), during startup or shutdown, or during installation of Windows OS. It’s important to note when The Microsoft Office Access database engine cannot open or write to the file ‘|’ issues happen, as it helps troubleshoot Microsoft Access problems (and report to Microsoft Corporation).

The Microsoft Office Access database engine cannot open or write to the file ‘|’ Problem Causes

The Microsoft Office Access database engine cannot open or write to the file ‘|’ problems can be attributed to corrupt or missing files, invalid registry entries associated with The Microsoft Office Access database engine cannot open or write to the file ‘|’, or a virus / malware infection.

Primarily, The Microsoft Office Access database engine cannot open or write to the file ‘|’ issues are produced by:

  • Invalid (corrupt) The Microsoft Office Access database engine cannot open or write to the file ‘|’ registry entry.
  • Virus-contaminated and corrupted The Microsoft Office Access database engine cannot open or write to the file ‘|’.
  • Malicious deletion (or mistaken) of The Microsoft Office Access database engine cannot open or write to the file ‘|’ by another application (not Microsoft Access).
  • A different application in conflict with The Microsoft Office Access database engine cannot open or write to the file ‘|’, or other shared references.
  • Microsoft Access (The Microsoft Office Access database engine cannot open or write to the file ‘|’) corrupted during download or install.

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

  • About 4 text files are linked as tables in the 2010 accdb (front end). When a second user has started the application, first query that references one of these tables fails on a 3051 runtime error «…cannot open the file…has been opened exclusively by
    another user». I even made the text files Read-Only….no dice.

    Get this: I can open the one error-prone text file using the TABLE view, but no queries can be executed against that table….even when they are obviously SELECT/Read queries.

    All text files have a similar connection string….with the only difference being the specification reference.

Answers

  • I have similar issues when I do things with the extension .accdb. I recommend using the .accde extension especially when distributing as an FE. This should make sure the Read Only is really Read Only.


    Chris Ward

    No Chris, that’s the not the core problem. I amended the connection string with : «;Mode=Read;ReadOnly=True» and that resolved the issue. I think this bug has been in Access since Access ’97. Shame on Microsoft. Connections made in Excel are just as bad.
    Connections to Excel workbooks are really a hassle: if the sheet name changes, you must delete the link and re-establish a new one. However, for CSV files, it can be done by changing the connection string and refreshing the link. MSFT «forgot» to make the
    DatasourceFile property read/write for Excel files.

    • Proposed as answer by

      Tuesday, May 8, 2012 3:22 AM

    • Marked as answer by
      许阳(无锡)
      Tuesday, May 29, 2012 7:41 AM

  1. Run time error — 3051

    Hey everyone,

    The database that I am working on suddenly started showing this error. Everyone else is able to connect to it except me. I don’t understand what to do.
    I was able to connect to this for a week.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	10 
Size:	23.7 KB 
ID:	36336


  2. The message is unusually helpful.
    It has either been opened exclusive by someone else ….look for a lock file
    OR you don’t have read/write permissions to the folder containing that file… Check by browsing direct to the file.

    However, Access databases should never be run from shared network locations

    Colin, MVP 2022, Website, email
    The more I learn, the more I know I don’t know. When I don’t know, I keep quiet!
    If I don’t know that I don’t know, I don’t know whether to answer


  3. usually there is a lock file open… .lccdb (on your front end)
    delete it then open the .accdb

    provided you DO have a split database correct? Each person has their own copy of the Front End.
    If you don’t have a

    split database, then split it.


  4. Hey Ridders & Ranman,

    Thanks for your replies.

    Yes, it is a split database. And there is no Locked file on my end. I have restarted the computer thrice, But how do I find this locked file??


  5. Look in the folder containing the backend file as that is read only.
    If in use normally, there will be a lock file.
    If exclusive, there won’t be. If so ask IT support to help.
    If you can’t open the folder, it’s a permissions issue

    Colin, MVP 2022, Website, email
    The more I learn, the more I know I don’t know. When I don’t know, I keep quiet!
    If I don’t know that I don’t know, I don’t know whether to answer


  6. The lock file on the backend is normal and should be there.
    otherwise I see no reason for you to be locked out.

    and if YOUR Frontend is only used by you,then there should be no problem.
    you could try getting another copy of the FE. Sometimes corruption may do it.


  7. Yes the lock file is normal & should indeed be there …if the split database is being opened correctly by all users.
    BUT if someone has exclusively opened the BE file directly from that folder, the lockfile won’t exist but you will be unable to write to the file from the FE

    Colin, MVP 2022, Website, email
    The more I learn, the more I know I don’t know. When I don’t know, I keep quiet!
    If I don’t know that I don’t know, I don’t know whether to answer


  8. Okay… There was a locked backend file. Now its no longer there. But now I still can’t enter.

    I have tried running it from different front-end database.

    I have restarted my laptop again. Still no use.


  9. Can you open the BE file direct …if nobody else is running the FE?
    If not, check permissions.

    When others open the FE are there any signs of data corruption?

    Where is each user’s copy of the FE located? On their own workstation or a shared network drive?
    Is anyone else running the exact same copy of your FE? In other words sharing the same FE?

    Colin, MVP 2022, Website, email
    The more I learn, the more I know I don’t know. When I don’t know, I keep quiet!
    If I don’t know that I don’t know, I don’t know whether to answer


  • #1

I have a small database that is used by the users, only to get reports. No input.
The database is split and gets it’s changing data from an Excel csv file.
I created a linked text file pointing to the Excel csv file. (I run another program to generate the Excel file)
Excel file is lengthy, with nearly 107,000 rows of data.
I had to use a text file due to one of the columns started with many numbers, but then changes to alphanumeric entries. Thus, since Access only looks at the first few entries (I think 16), it determines that field should be a Long Integer. In a text file, I can change it to Short Text.
That said, my problem is users will get the run-time error ‘3051’ when someone else is in the database and has a report open, as shown below.
If no one else is in a report, all users are able to run a report, but only one at a time.
I think the problem is with linked texted file.
Any ideas on how to fix?

1660221442049.png

1660221479639.png

  • #2

Perhaps you should have a split database with each user having their own copy of the front end, linked to a single backend. Import the data to the backend file. With a split db multiple users can use it at the same time

  • #3

Perhaps you should have a split database with each user having their own copy of the front end, linked to a single backend. Import the data to the backend file. With a split db multiple users can use it at the same time

It is split and each users has their own FE. But I think your on to something with importing the Excel file to the BE.
I’ll try that and let you know.
Thanks!

Uncle Gizmo


  • #4

since Access only looks at the first few entries (I think 16), it determines that field should be a Long Integer.

I had a similar problem many moons ago. The solution was to replace the first few rows of data with data in the format I wanted MS Access to import. You can add some dummy Rows to the beginning of the file, Rows filled completely with text. That will Force MS Access to import text

The_Doc_Man


  • #5

I think the problem is with linked texted file.

You are correct. The linked Excel file uses Excel’s whole-file locking whereas Access databases would use a more selective method of locking. Excel files do not share very well. You mentioned «changing data» i.e. the file is not constant. It gets updated. That means that the file is opened in WRITE mode, perhaps. I searched the forum and found an article on the problem. I’m not sure that you can ever actually do a SHARED WRITE operation on an Excel back-end file, but here is how you allow Excel backends to perform updates.

Access-Excel. How to edit an excel file from Access using SQL

As I’m sure you are aware, if you create a linked table to an excel sheet/range you can sort it, filter it, join it to other tables. What you can’t do is edit the data. In many cases this does not matter since the requirement is to import the data or use as a reference. However on occasion…


www.access-programmers.co.uk

The REAL solution would be to convert the Excel file to be part of the back-end file in Access format. Then the question would be how often that dataset gets changed, because of potential bloat. However, 107,000 rows in Excel isn’t that bad in Access. We have many users with million-row tables. I’ve gotten to over 600K records myself once or twice. So with proper indexing, it wouldn’t be that bad.

  • #6

You are correct. The linked Excel file uses Excel’s whole-file locking whereas Access databases would use a more selective method of locking. Excel files do not share very well. You mentioned «changing data» i.e. the file is not constant. It gets updated. That means that the file is opened in WRITE mode, perhaps. I searched the forum and found an article on the problem. I’m not sure that you can ever actually do a SHARED WRITE operation on an Excel back-end file, but here is how you allow Excel backends to perform updates.

Access-Excel. How to edit an excel file from Access using SQL

As I’m sure you are aware, if you create a linked table to an excel sheet/range you can sort it, filter it, join it to other tables. What you can’t do is edit the data. In many cases this does not matter since the requirement is to import the data or use as a reference. However on occasion…


www.access-programmers.co.uk

The REAL solution would be to convert the Excel file to be part of the back-end file in Access format. Then the question would be how often that dataset gets changed, because of potential bloat. However, 107,000 rows in Excel isn’t that bad in Access. We have many users with million-row tables. I’ve gotten to over 600K records myself once or twice. So with proper indexing, it wouldn’t be that bad.

Thanks Doc, I will check this out.
I’ve tried creating the same text file in the BE but then I’m not able to link it to the FE. I guess you either can’t link and linked table or you can’t link to a text file since it’s really not a table. ??

The_Doc_Man


  • #7

If you tried to create that file in the BE via OLE embedding, I don’t think you can use it as a table. If you could import that 107K rows as a normal Access table, it should be possible to use it normally. However, if the spreadsheet has more than 255 columns or if any row has more than about 4K bytes, it won’t fit. Also, if any single cell has more than 255 bytes, that won’t import correctly either.

  • #8

To solve the bloat problem when I have to import data from external sources, I use a temporary BE. I create a BE with the table definitions and relationships I need. I link this db to my FE and load it with data to ensure that it works. Then I delete the data and compact the database and rename it myBE_template.accdb. To start the import process, my code copies the template to the local directory that holds the FE. In the process it renames it to myBE.accdb. That ensures that the links remain intact since the name of the BE and the table names stay constant. Then the process continues by linking to the spreadsheets (if the link isn’t permanent) and use append queries to append to the tables in the linked temp BE.

We can help with code if this is the solution you think will work for you.

gemma-the-husky


  • #9

I had a similar problem many moons ago. The solution was to replace the first few rows of data with data in the format I wanted MS Access to import. You can add some dummy Rows to the beginning of the file, Rows filled completely with text. That will Force MS Access to import text

Yes, I do that. Otherwise you can get a text column, but you can’t stop access/excel deciding it’s a numeric column. If you know how to select the dummy data, you can then delete it after the import. It’s harder with excel. Probably easier with a CSV, as you can manipulate them more easily.

  • #10

Well, here’s the solution I’ve come up that seems to work.
It involves a command button on the form that runs Docmd.TransferText with a saved specification that changes the column from numerical to short text. It first runs a delete query to clear the table that is to be updated.
Here’s my form, highlighting the command button, table where data is stored and the delete query.

1660586873118.png

Here is my code for the Command Button shown above labeled, «Import — Allowance Status Data.»

Code:

Private Sub cmdIMPORT_Click()
    Dim Msg1, Response1, Msg2, Response2, Style, Style2, Title1, Msg3, Title3, Style3, Response3, fName
    Msg1 = "Are you sure you want to IMPORT the Allowance Status Report?"
    Style1 = vbYesNo + vbCritical + vbDefaultButton2
    Title1 = "IMPORT"
    
    Msg2 = "Worksheet imported!"
    Style2 = vbOKOnly + vbInformation
    
    Msg3 = "Cannont find the file:" & vbCrLf & "'IHS - Allowance Status by Project and Location.csv'" & vbCrLf & " " & vbCrLf & "Please make sure that the CSV file is named correctly and in the correct location."
    Style3 = vbOKOnly + vbCritical
    Title3 = "ERROR - NO FILE FOUND"
        
    Response1 = MsgBox(Msg1, Style1, Title1)
    If Response1 = vbNo Then
        Exit Sub
    ElseIf Response1 = vbYes Then
    
        On Error GoTo SubError
        
        'This checks if the file exists.
        Const workFolder As String = "W:DFM_DatabasesIHS - Allowance Status by Project and Location.csv"
        If FileExists(workFolder) Then
           Else
              Response3 = MsgBox(Msg3, Style3, Title3)
           Exit Sub
        End If
        
        DoCmd.SetWarnings False
        
        ' This deletes the data in the table.
        DoCmd.OpenQuery "Delete_IHS - Allowance Status by Project and Location"
        
        fName = "W:DFM_DatabasesIHS - Allowance Status by Project and Location.csv"
        
        ' This runs the saved Import under the External Data tab where I changed the data type for the BAP column to short text.
        ' True means the spreadsheet has column names for the first row
        DoCmd.TransferText , acImportDelim, "IHS - Allowance Status by Project and Location", fName, True
              
            
        ' This provides the current date for display on the form.
        Response2 = MsgBox(Msg2, Style2, Title1)
        DoCmd.OpenQuery "UpdateImportTable_Q"
        DoCmd.RefreshRecord
      
        DoCmd.SetWarnings True
          
SubExit:
    On Error Resume Next
            Exit Sub
SubError:
        MsgBox "Error Number: " & Err.Number & " = " & Err.Description, vbCritical + vbOKOnly, _
           "An error occurred."
        GoTo SubExit
    
   End If
End Sub

NOTE: To create the specification, you need to create is under the External Data tab, then Text File.
There are a few steps in creating this spec file. An import one being, clicking the Advance button and then clicking Save As, and renaming the specification name to a shorter name than what we defaulted. The default name would not save. I’m assuming it is to long.

That’s it!

1660587219265.png

  • Home
  • VBForums
  • Visual Basic
  • Database Development
  • Run time error 3051

  1. Feb 7th, 2011, 11:37 PM


    #1

    s.anchawale is offline

    Thread Starter


    New Member


    Run time error 3051

    HI ALL,

    I am tring to share an access database between two PCs with LAN connection in VB6 programming. I am using DAO 3.6 i.e opendatabase
    command for the database accessing.While running the program it shows Run time error 3051. My question is :-

    1) Can we open the same database on both PCs at the same time ???

    2) If yes then what is solution for .ldb file???

    I tried hard to remove this error..
    Please help me …


  2. Feb 8th, 2011, 06:17 AM


    #2

    Bill Crawley is offline


    Fanatic Member


    Re: Run time error 3051

    This usually happens when the Database is set to readonly. go to the database location through windows explorer and ensure the file database properties isn’t set to read only. Also under the security tab make sure the other user has write access.

    Last edited by Bill Crawley; Feb 8th, 2011 at 06:20 AM.


  • Home
  • VBForums
  • Visual Basic
  • Database Development
  • Run time error 3051


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

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Runtime error 3421
  • Runtime error 91 object variable or with block variable not set excel vba
  • Runtime error 3021 как исправить
  • Runtime error 340
  • Runtime error 9 subscript out of range как исправить excel

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии