An error occurred while accessing the ACCESS database from ADO in the English operating system.

Source: Internet
Author: User

If the customer is a foreign user and uses Windows XP in English, an ODBC database access error will be reported as soon as our program is started. Since they are not our direct customers, they have been communicating for a long time before and after this issue. I don't know how they will evaluate our service capabilities, but I feel a little ashamed. In fact, this is not very difficult, mainly because there is no time to take care of this matter (this part was developed by another colleague), and there is no English version of the operating system.

Today, we finally have time and opportunity to drum up on this matter. I use the English version of Windows 2003. In order to be consistent with the environment of foreign users, I removed the East Asian language support and ran the program. The error occurred. The key information is as follows:

Cannot open database XXX. It may not be a database that your application recognizes, or the file may be uploaded upt.

The best way to solve this problem is Google. As expected, I found the corresponding content. Microsoft has an article to explain this problem:
Http://support.microsoft.com/kb/310937/zh-cn

In this article, the problem occurs because the access 2000/2002 driver is used to access the Access 97 file format and Microsoft JET 3. the loss of the X registry key reminds me that my colleague used the database file created by Access 97. How should I check the registry key following the instructions in this article and find that my computer contains this item?

If you want to solve this problem, it is caused by the access file format, I decided to use Access 2003 to create a new database file (you can directly select the database format conversion tool under the "tool" to do this ).

After the old file is replaced with the new file, no error occurs when the database file is opened, and a new error occurs when the SQL statement is executed:

Selected collating sequence not supported by the operating system

How can this be done? Continue to Google, and find that there are quite a few good people. The above problem is because I created an access file in a Chinese environment, and its default sorting method is Chinese, in a pure English system, problems may occur.

Solution: Change "tool-> Option-> General-> new database sorting order" from Chinese to "General", and then select "new-> Empty Database ", run "file-> Get external data-> Import" to import all the previous file content. See http://blog.csdn.net/wishfly/archive/2006/03/21/631663.aspx

I was relieved to try a new file and pass it smoothly. Of course, I have made more content for this purpose. For example, I tried to use Access 2002, 2000, and 97 files in sequence to select the appropriate version. I was planning to create a database table dynamically, but I gave up because of a lot of things. In fact, I prefer to change the database to berkeleydb or SQLite, because they are more suitable for our application of this software.

Finally, let me try again. I like to send my own solution to my blog, hoping to help my friends who have the same problem, just like getting help from others, why not?
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.