Recent debugger encountered some problems, or on 64-bit machine on the 32/64-bit ODBC driver problem, the program uses UDL files to connect to the database, but the machine does not have a 64-bit driver installed, how to make UDL files looking for 32-bit drivers, the following article gives inspiration:
1. Problems with ODBC on Server 2003 64 machine: Open Control Panel on Server 2003 64 machine, locate Administrative Tools, find ODBC open-in driver options only SQL Server drivers are found. Click on the System DSN option, click Add to find that there is nothing else but SQL Server, this is the first problem I encountered in this day. What is the cause of the problem? This problem also took me a lot of time, let me explain:
This problem is because I overlooked a big premise, that is, the operating system is Server 2003 64-bit, as long as the attention to this premise, then this problem solved half. 64-bit systems are different from 32-bit systems, and ODBC and the following UDL files are related to the system. The ODBC you found on the Control panel is 32-bit, so there is no other database driver, in fact, in the 64-bit system has his own ODBC, it is stored in the \windows\syswow64/folder. Then you can find Odbcad32.exe in this file plus double-click to see all the database drivers.
2, 32-bit UDL file in Server 2003 64 machine problems: I use the UDL file on a 32-bit device to test the connection is not a problem, the test link on a 64-bit computer is a connection error, the prompt cannot connect to the data source, the data source is not found, This question also charges me for a long time. In fact, the problem is also the problem of the system. A 64-bit system has its own policy when it processes UDL files on a 32-bit system. Details of the following English instructions:
"UDL Test" on a A-bit machine
Let's say you ' ve started playing with the UDL files on your "All" machine and the tiny little UDL files helped you to Iden Tify connectivity issues or you ' ve easily obtained the OLE DB connection strings for your applications. So far so good. But one day, you followed the same procedure on a with a bit machine and couldn ' t see the OLE DB Providers though you ' re sure That's it ' s been installed. There must is something wrong then?
The reason behind for the. When you double clicked on a UDL file on a A-bit machine, it's enumerate only the bit OLE DB Providers and most Proba Bly you ' ve installed a +-bit OLE DB Provider.
So then, there should is a-a-to-a-making UDL Test using the-the-bit OLE DB Providers on a.
Actually when you ' ve created a UDL file on a A-bit machine and double-clicked on it,
"C:\Program Files\Common Files\System\Ole DB\Oledb32.dll", Opendslfile C:\test.udl
Command'll be called through C:\windows\system32\rundll32.exe
Both binaries (Oledb32.dll and rundll32.exe) used here is a bit and a bit oledb32.dll does not deal with the + bit OLE DB Providers.
Since we already have a-bit versions of those Oledb32.dll and rundll32.exe in the other folders the our-bit machines, we NE Ed to use them. Therefore, instead of double clicking on the UDL file, we'll need to execute the command below from a command line or Star T/run:
C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86) \common Files\System\Ole db\oledb32.dll", opendslfile \ c \ Test.udl
Et voila:) There you have your-bit OLE DB Providers.
The above article in English is from http://blogs.msdn.com/b/farukcelik/archive/2007/12/31/ Udl-test-on-a-64-bit-machine.aspx, due to my own English translation level of reasons not translated, the solution is: C:\Windows\syswow64\rundll32.exe "C:\Program Files ( x86) \common Files\System\Ole db\oledb32.dll ", Opendslfile C:\test.udl here C:\test.udl is the path to your UDL file. The idea of solving the problem is the same as above.
===========================================================================
1. View the 32-bit database-driven method within the 64-bit win system view 32-bit ODBC driver: Start C:/windows/syswow64/odbcad32.exe View 64-bit ODBC driver, start c:/windows/system32/ Odbcad32.exe or go to the Control Panel to view the 32-bit OLE DB driver:
Start a 32-bit CMD environment start C:/windows/syswow64/cmd.exe
Executing start xxx.udl within this 32-bit environment will start the Rundll32 of the 32-bit subsystem to manage the UDL database connection. 2. View 64-bit OLE DB driver: Create a new xxx.udl, double-click to open.
3. Other
What kind of folder is SysWOW64?
WoW64 (Windows-on-windows 64-bit) is a subsystem of a Windows operating system
Rundll32.exe c:/progra~1/common~1/system/oledb~1/oledb32.dll,opendslfile%1
C:/windows/syswow64/rundll32.exe c:/progra~2/common~1/system/oledb~1/oledb32.dll,opendslfile%1
Hkey_local_machine/software/odbc
Hkey_local_machine/software/wow6432node/odbc
hkey_classes_root/wow6432node/. UDL
Hkey_classes_root/wow6432node/msdasc/shell/open/command
hkey_classes_root/. UDL
Hkey_classes_root/msdasc/shell/open/command