>>>>>Hi Antonio,
>>>>>
>>>>>I installed the trial version of the Devart ODBC driver. And when I go to my ODBC Source Administrator I see the driver, named "Devart ODBC Driver for SQL Server", exactly how you have in your test code (above). Yet when I run the above PRG I get "Devart ODBC Driver for SQL Server Not Available"
>>>>>Can you think of what I may have done incorrectly?
>>>>>
>>>>>Thank you.
>>>>
>>>>Dmitry, make sure you installed the driver for Win32. That's the one that VFP will see and use, regardless if you have a 64-bit machine.
>>>
>>>Antonio, I think I chose to install both, Win32 and Win64. I may have to uninstall it and install again, choosing only Win32.
>>>Thank you.
>>
>>Dmitry, you can have both, no problem with that. Just make sure the Win32 is installed, and check this installation in the 32-bit ODBC administrator at %windir%\SysWOW64\odbcad32.exe.
>
>Antonio, I installed the drivers into the default folder c:\program files (x86)\Devart\ODBC... Do you think I need to copy the dll from the installed folder into some system folder?
No, no, Dmitry, not at all. In 64-bit machines you'll have two ODBC administrators, one for the 64-bit drivers and their DSN, the other for the 32-bit drivers. Check on the dialog window title to determine which one you're using (it will display (64 bits) or (32 bits) after the name). Running %windir%\SysWOW64\odbcad32.exe is just a way to be sure to run the 32-bit administrator.
If you are absolutely sure that the 32 bit driver is installed, then change the program to fetch the reason why the connection failed - AERROR() will populate an array with the information on the condition that is leading SQLCONNECT() to return -1.
----------------------------------
António Tavares Lopes