Microsoft odbc microsoft access ошибка

  • Remove From My Forums
  • Общие обсуждения

  • Используются БД Access. В таблицах используются поля bigint, соответственно, формат базы 2016, версия 16.7. стоит odbc драйвер х64 2016.

    Созданы источники данных х64 — 2 БД.

    Все здорово, все как написано в статьях майкрософта в открытом доступе, все прочитал, все понимаю. Но только при попытке подключить экспорт по odbc сторонняя программа не видит таблицы БД. Т.е. источники видны — 2 БД, 
    а их таблицы для настройки экспорта из сторонней программы не видны. Кто-то сталкивался с такой ситуацией?

    п.с. если bigint не использовать, формат базы 2007-2016 и все работает с драйвером х64 2010.

    Т.е. проблема связана с появлением bigint и изменением формата файлов.

    • Изменено

      14 сентября 2020 г. 19:48

    • Изменен тип
      Maksim MarinovMicrosoft contingent staff, Moderator
      25 сентября 2020 г. 7:48
      тема неактивна

I have created DSN for Mapped drive like this:-

 Y:\192.168.2.5datadb.accdb

Now i am accessing this database from java application using sun jdbc odbc drivers. Application is running on Window 2008 64-bit system and database is running on Window Server 2012 64-bit system.

When I ran this application with Java 64-bit it throw error of architecture mismatch.

Then i install java of 32-bit and the above problem is resolved. But getting another problem as

  java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is
  not a valid path. Make sure that the path name is spelled correctly and that yo
  u are connected to the server on which the file resides. 

How to resolve this problem?

enter image description here

See the database path witch is not valid for my program. This path is mapped with Y:192.168.2.5shared drive.

asked Aug 9, 2014 at 19:09

Sunil's user avatar

SunilSunil

1632 gold badges2 silver badges7 bronze badges

I have discovered, it seems, that a mapped network drive is not available to IIS as it runs as a service. In addition, I have been unable to create a DSN entry with a UNC path. So, I created the DSN with a local database, then changed the path in Regedit. What a pain. Be sure to provide proper credentials (UID and PWD).

answered Apr 5, 2017 at 14:57

Chas Callaway's user avatar

0

Use a valid PATH, the problem with this

Y:\192.168.2.5datadb.accdb

Is that is a special character. You need,

Y:\192.168.2.5\data\db.accdb

or

Y:/192.168.2.5/data/db.accdb

answered Aug 9, 2014 at 19:16

Elliott Frisch's user avatar

Elliott FrischElliott Frisch

197k20 gold badges156 silver badges248 bronze badges

3

To summarize I bet this was a permission problem.

Was having the exact same error message and was baffled because it was working earlier. It was because I was changing versions of Tomcat on my end and it was running without permission to access my db resource.

answered Oct 27, 2015 at 18:07

ggenglish's user avatar

ggenglishggenglish

1,66818 silver badges19 bronze badges

so I had a similar, if not the same, issue.

had installed wamp.
was using php to access a mdb file on the network. and I got the msg saying path not found.

so what I did was, created a normal dsn configuration and then how it looked like was something like this:
Y:mydata.mdb

I searched for «y:mydata.mdb» on regedit and found it.
changed it to full path for example like «serveripserverfoldermydata.mdb»

This was done on administrative user.

I refreshed the web page and it worked.
Hope this helps somebody.

p.s.
written on a rush. sorry if I wasn’t clear.

answered Dec 27, 2017 at 6:38

dhuvvamundha's user avatar

I just fixed this connection string by spelling out the fully qualified dns name, instead of using the mapped drive name "H:":

BAD

sCN_ODBC = @"Driver={Microsoft Access Driver (*.mdb)}; Dbq=H:vol01IITAppsApplicationsMFGUser.mdb;Trusted_Connection=yes";

GOOD

sCN_ODBC = @"Driver={Microsoft Access Driver (*.mdb)}; Dbq=\tstorage.iit.edudepts$vol01IITAppsApplicationsMFGUser.mdb;Trusted_Connection=yes";

I’m using C# dotnet , other posts on this thread are java and php

Nilesh Thakkar's user avatar

answered Jul 1, 2019 at 14:51

Todd Harvey's user avatar

Todd HarveyTodd Harvey

1892 silver badges4 bronze badges

Causes

General error Unable to open registry key Temporary (volatile) Ace DSN for process …

This is the top-level error message produced by the Access Database Engine (a.k.a. «ACE») ODBC driver when the current process is unable to open the Access database file for one of the following reasons:

  1. Some other process has opened the database «exclusively».

  2. Some other process originally opened the database file in Access as «shared» and
    has some pending structural modification that requires «exclusive» access to the file. Examples of such pending modifications are edits to Module code that have not yet been saved, or having a Form or Report open in Design View.

  3. The account under which the current process is running does not have sufficient filesystem permissions to open the database file or the folder in which it resides.

  4. The account under which the current process is running does not have sufficient registry permissions to access the values under the HKLMSOFTWAREODBC key.

  5. The database file simply does not exist.

  6. The database you are trying to open requires a newer version of Microsoft Access.

When only the top-level error message is reported, the earlier «Jet» ODBC driver produced somewhat more intuitive error messages. When the other process had done an «Open Exclusive» on the file the error message was

Could not use ‘(unknown)’; file already in use.

and when the file had pending design changes the error message said

The database has been placed in a state by an unknown user that prevents it from being opened or locked.

However, when we only see the top-level message produced by the ACE ODBC driver all we see is

General error Unable to open registry key Temporary (volatile) Ace DSN for process …

That is because both drivers return multiple error messages, but they return them in a different order. The Jet messages are …

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The database has been placed in a state by an unknown user that prevents it from being opened or locked.

ERROR [01000] [Microsoft][ODBC Microsoft Access Driver]General Warning Unable to open registry key ‘Temporary (volatile) Jet DSN for process 0xed4 Thread 0x1204 DBC 0xab004 Jet’.

ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver’s SQLSetConnectAttr failed

ERROR [01000] [Microsoft][ODBC Microsoft Access Driver]General Warning Unable to open registry key ‘Temporary (volatile) Jet DSN for process 0xed4 Thread 0x1204 DBC 0xab004 Jet’.

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The database has been placed in a state by an unknown user that prevents it from being opened or locked.

… while the ACE messages are:

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet’.

ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver’s SQLSetConnectAttr failed

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet’.

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The database has been placed in a state by an unknown user that prevents it from being opened or locked.

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet’.

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0xf6c Thread 0x1568 DBC 0x6347fec Jet’.

ERROR [HY000] [Microsoft][ODBC Microsoft Access Driver] The database has been placed in a state by an unknown user that prevents it from being opened or locked.

Solutions

Scenarios 1 and 2 (another process has an «exclusive» lock on the file):

Ensure that the database file is not opened by any other process – often that means just closing the Access application itself – and then re-try the ODBC operation from your external application. Rebooting your machine is one way to ensure that any other such processes have been terminated and have relinquished their claim to the database file.

Scenario 3 (insufficient file/folder permissions):

Either adjust the permissions or move the file to a location where the user can open the file. Placing the database file in the root folder of a drive is a common cause of this type of problem.

Scenario 4 (insufficient registry permissions):

Adjust the registry permissions to allow the account to access the HKLMSOFTWAREODBC key. The most common cause in this case is that an IIS process is running under an account that does not have normal «user» privileges. In that case remember that you should not be using Access databases with IIS anyway.

Scenario 5 (database file does not exist):

Fix the connection string so that it contains a valid path to an existing file.

Scenario 6 (database file requires a newer version of Access):

Upgrade Microsoft Access or the Access Database Engine Redistributable (if available).

Summary:
The blog outlines reasons that may result in ‘MS Access error 3049 – cannot open database’ issue. It also describes some manual methods to fix the error such as using the MS Access built-in compact and repair utility, and Windows built-in drive tool to repair the ACCDB or MDB database files. Plus, you can try recovery tricks like importing data into a new db or restoring a backup to salvage data from corrupt file. The article also discusses how Stellar Repair for Access software can help fix the issue when the manual methods fail.

Free Download for Windows

Contents

  • Reasons behind Access Database Error 3049
  • How to fix Access Cannot Open Database Error 3049
  • What If Nothing Works?

Sometimes, when importing data, running an action query or adding new records in MS Access, you may encounter runtime error 3049 along with the following message:

Cannot open database. It may not be a database that your application recognizes, or the file may be corrupt’.

Can't Open Access Database Error
Figure 1 – MS Access Cannot Open Access Database Error Message

In order to find the correct solution to fix ‘Access error 3049’, it is important to know the actual reasons behind it.

Reasons behind Access Database Error 3049

As you may know, Microsoft Access 2007 and higher versions by default create databases in ACCDB file format. MS Access 2003 and earlier versions create db in MDB file format. If you can’t open the ACCDB or MDB file, it’s very likely that the file has turned corrupt and results in Microsoft Access cannot open the database error.

Access database file corruption may occur due to the following reasons:

  • Access database size limit has reached or exceeded 2 GB.
  • Hardware or software inconsistencies and conflicts.
  • File damage due to storage of large volume data.
  • Unintentional deletion of data or storage media format.
  • When the structure or header of an ACCDB file is damaged.
  • Incompatibility of the file created in Access 2003 or earlier versions.
  • The database is restored from invalid backup.

How to fix Access Cannot Open Database Error 3049

Following are some methods to fix MS Access cannot open database error:

NOTE: Attempting to repair the corrupt Access database manually may cause further corruption, leading to permanent data loss. So, make sure to create a backup copy of the db, even if it is in a corrupt state before performing any manual method.

Method 1 – Run Access Compact and Repair Utility

If you are receiving the error message “Cannot open database.  It may not be a database that your application recognizes, or the file may be corrupt.”, check if the database has reached or exceeded the 2 GB limit. If so, running MS Access built-in ‘compact and repair’ utility may help.

To run ‘compact and repair’, follow these steps:

Step 1: Open MS Access application.                           

Step 2: In the window that pops-up, double-click Blank desktop database.

Blank Desktop Database in Access
Figure 2 – Blank desktop database

Step 3: Go to File, and then click Close.

Close Access Database
Figure 3 – Select Close

Step 4: In the window that appears, click Database Tools, and then choose Compact and Repair Database on Tools menu.

Database Tools

Figure 4 – Compact and Repair Database

Step 5: In Database to Compact From dialog box, find and select the database you want to compact and repair.

Access Database to Compact From
Figure 5 – Database to Compact From Dialog Box

Open copy of the compacted and repaired database. The copy will be saved in the same location as your previously saved original database.

Also Read: Repair access database when compact and repair did not work

Method 2 – Import Everything into a New Database

Attempt to import and restore data from the corrupt db into a new Access database. To do so, follow these steps:

Step 1: Create a new database file, by clicking Blank desktop database (refer to Figure 2).

Step 2: Click the External Data tab, and select Access on Import & Link menu.

External Data Option in Access Database
Figure 6 – External Data Option

Step 3: In Get External Data – Access Database dialog box, browse the source (i.e. corrupt) db.

Get External Data - Access Database Window
Figure 7 – Get External Data

Step 4: Click OK.

Step 5: In Import Objects dialog box, click the tab depending on the objects you want to restore. For instance, choose ‘Forms’ to import forms from the source db into the new one.

NOTE: Click the ‘Select All’ button if you wish to restore all the objects.

Import Objects
Figure 8 – Import Objects Window

Step 6: Click OK to finish importing the selected objects into the new database.

Method 3 – Use Windows Built-in Drive Tool

If you cannot compact and repair the Access database, or have failed to import data into a blank db, using Windows built-in drive tool may help. The tool can help repair corrupt database and deal with errors such as 3049.

Here’s how you can use the drive tool to repair corrupt database:

Step 1: Open File Explorer, and navigate to the following location:

C:WindowsSysWOW64

Step 2: In the window that appears, search for odbcad32.exe file.

Step 3: Double-click odbcad32.

Search and Find odbcad32.exe file
Figure 9 – Select odbcad32

Step 4: The ODBC Data Source Administrator (32-bit) window is displayed. From DSN, select MS Access Database under Name, and then click Add.

odbc Data Source Administrator Dialog Box
Figure 10 – ODBC Data Source Administrator (32-bit) Window

Step 5: In Create New Data Source window, select ’Driver do Microsoft Access (*mdb), and then click Finish.

Create New Data Source
Figure 11 – Create New Data Source

Step 6: In ODBC Microsoft Access Setup dialog box, click Repair.

NOTE: Click ‘Select’ under Database to choose the type of database (.mdb or .accdb) file you want to repair.

ODBC Microsoft Access Setup
Figure 12 – ODBC Microsoft Access Setup Dialog Box

Step 7: From the Repair Database window, select the drive followed by the folder in which the corrupt MDB file is stored. Click OK.

Select Database
Figure 13 – Repair Database Window

Step 8: If repair is successful, you will receive a message saying the database was successfully repaired.

Access Database Repaired Message
Figure 14 – Database Successfully Repaired Message

Step 9: Click OK and check if you can open the db.

Method 4 – Convert Access MDB File to ACCDB

NOTE: This method only applies to users using Access database in MDB file format.

Access offers a manual procedure that can help export data from MDB file format to ACCDB format, in order to view the incorporated content. To get started, it is imperative to close all programs and files associated with MS Access.

Perform the following steps to convert MDF file to ACCDB file format:

MDB to ACCDB
Figure 15 – Convert MDB File to ACCDB File

Step 1: Open MS Access, click the File tab, and then click Open.

Open File in MS Access
Figure 16 – Access Database Open Window

Step 2: In the Open dialog box that appears, open the Access MDB file that needs to be converted to the ACCDB file format.

Browse Files
Figure 17 – Open Dialog Box

Step 3: Under the Database File Types, click Access Database (*.accdb).

Database Types
Figure 18 – Save Database As Option

Step 4: Click Save & Publish.

If any of the Access database objects are open at this stage, the application will prompt to close them first and then proceed. Click ‘Yes’ to instruct the application to close the object or alternatively click ‘No’ if you want to cancel the entire conversion process. Access will then prompt to save the changes being made recently (if any).

Step 5: Next, provide a name to the converted file in the File name field, and then click Save.

A copy of the database will be created and opened by the application. The original database will be automatically closed by MS Access.

Also read: How to Backup and Restore Access Database?

What If Nothing Works?

If none of the above method helps fix Access database error 3049, you can try restoring the last known good backup copy of the db.

In case nothing works and backup is also not available, use Stellar Repair for Access software to resolve the issue. The Access repair software helps repair and recover Access database (ACCDB and MDB) files. It also helps retrieve all deleted, formatted, or lost data from the database file.

Free Download for windows

Here’s a video to help you understand how Stellar Repair for Access software can be used to repair corrupt database files.

About The Author

Priyanka Chauhan

Priyanka is a technology expert working for key technology domains that revolve around Data Recovery and related software’s. She got expertise on related subjects like SQL Database, Access Database, QuickBooks, and Microsoft Excel. Loves to write on different technology and data recovery subjects on regular basis. Technology freak who always found exploring neo-tech subjects, when not writing, research is something that keeps her going in life.

Hi Iftikhar,

if you’re using accdb. Format, then you can make the following steps:

step 1: SELECT «OLE DB » in the Database tab

step2: Check «force 32 Bit»

step3: Click «Connect»

step4: in the «Data Link Properties «. Select «Microsoft Office 12.0 Access Database Engine OLEDB Provider»

step5: Click «Next»

step6: You will be directed to «Connection Tab»

step7: Copy and paste the complete/full path of the Access Database («E…..yourDatabase.accdb»)

step8: Go to «Advanced tab», uncheck «Share Deny None» and Check «Read/Write»

step9: Go to «Connection tab» and click «Test Connection»

step10: then you will have a message : «Test Connection succeeded»

step11: Click «OK»

here is a way of proceeding in case of : MDB.Format

step1: Select «OLE DB» in the Database tab

step2: Check «force 32 bit»

step3: Click «Connect»

step4: in the «Data Link Properties», select «Microsoft Jet 4.0 OLE DB Provider»

step5: Click «Next»

step6: You will be directed to «Connection» tab

step7: Select the Database in 2002 Format(.mdb)

step8: Go to «Advanced» tab, uncheck «Share Deny None» and Check «Read/Write»

step9: Go to «Connection» tab and click «Test Connection»

step10: You will have message: like «Test Connection succeeded»

step11: Click «Ok»

i hope that helps

Beck

Понравилась статья? Поделить с друзьями:
  • Microsoft flight simulator 2020 ошибка при установке
  • Microsoft net framework ошибка сертификата
  • Microsoft fix it tool для исправления ошибки
  • Microsoft feeds synchronization обнаружена ошибка windows xp
  • Microsoft excel ошибка сертификата ssl