-
Notifications
You must be signed in to change notification settings - Fork 52
0820 OLE DB Driver Install Checking
The simplest way to test an OLE DB Provider is via the UDL file. Create any text file in Windows Explorer and rename to have a .UDL file extension. Make sure you have file extensions turned on to make the change.
Double-click the file and a dialog will open where you can see the installed Providers and test their connection.
The UDL file UI is provided by OLEDB32.DLL and hosted in RUNDLL32.DLL. The command for this is rather lengthy:
Rundll32.exe "C:\Program Files\Common Files\System\OLE DB\oledb32.dll",OpenDSLFile C:\test.udl
or
C:\Windows\SysWOW64\Rundll32.exe C:\PROGRA~2\COMMON~1\System\OLEDB~1\oledb32.dll,OpenDSLFile C:\test.udl32
The first command is for 32-bit systems or 64-bit Providers on 64-bit systems.
The second command is for 32-bit Providers on 64-bit systems.
The UDL file extension is mapped to the first command. You can double-click the file in Windows Explorer.
For the second, you can also run the 32-bit command prompt and then START C:\TEMP\TEST.UDL
to test 32-bit Providers.
If you use 32-bit providers a lot, you can map the file extension .udl32 to launch the 32-bit UDL dialog.
Copy the script to Notepad and save as udl32.reg.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.UDL32]
@="ft000001"
[HKEY_CLASSES_ROOT\ft000001]
@="Microsoft Data Link 32"
"BrowserFlags"=dword:00000008
"EditFlags"=dword:00000000
[HKEY_CLASSES_ROOT\ft000001\shell]
@="open"
[HKEY_CLASSES_ROOT\ft000001\shell\open]
[HKEY_CLASSES_ROOT\ft000001\shell\open\command]
@="C:\\Windows\\SysWOW64\\Rundll32.exe C:\\PROGRA~2\\COMMON~1\\System\\OLEDB~1\\oledb32.dll,OpenDSLFile %1"
[HKEY_CLASSES_ROOT\ft000001\shell\open\ddeexec]
Double-click the .REG file and then you can create a file with a .udl32 file extension, e.g. test.udl32, and it will launch the 32-bit UDL dialog.