Open method error when generating application in C # when reading and writing DBF
ERROR [IM002] [MICROSOFT][ODBC driver Manager] did not discover the data source name and did not specify a default driver
Before this program is used well, this upgrade modified after testing found this problem, seeked, originally I was a 32-bit operating system, now installed Win7 64-bit operating system, from the Control Panel-management tool-ODBC driver, opened after found themselves installed Microsoft Visual FoxPro driver is not in the list
So the process of hard-pressed ape began to surf the internet to search for information, to find problems, do not find problems sleep ah, hehe
The explanations are as follows:
Win7 64-bit operating system has two ODBC data sources (one under System32 Odbcad32.exe (Control Panel-management tool), one under SysWOW64 odbcad32.exe)
When we use VS to compile the program, the default build target platform is anycpu, such as (right-click Project properties), so that the program runs without knowing which ODBC driver should be used, replaced by X86, so there is the preceding hint
The following explains why you should choose X86
Run the program in the win764-bit operating system, the default is to find the driver in the System32, because 64-bit operating system to be compatible with the past 32-bit system, when running 32-bit program, the system will go to SysWOW64 below, so it solves the ODBC driver problem, The premise is that the computer has been driven.