Data Source Errors (Opening AutoCAD or Running Any Command)
Issue
Upon starting AutoCAD, or any Land F/X command, you received an error message similar to the following:
Error: vla-object nil also, some ODBC errors, such as “driver could not be loaded”, “odbc provider not found”, “no default provider”, etc.
Solution
Type the following in the Command line:
(vlax-create-object “adodb.connection”)
If that command doesn't return anything, ADO is not responding. But first make sure the issue is not the vlax system. Type the following commands:
(vlax-create-object “msxml2.xmlhttp”)
(vlax-create-object “wscript.shell”)
(vlax-create-object “scripting.filesystemobject”)
(vlax-create-object “shell.application”)
(vlax-create-object “adodb.recordset”)
(vlax-create-object “cdo.message”)
All commands listed above should return a vlax object, rather than nothing.
Repairing or reinstalling AutoCAD would be best course if any of these commands are returning nothing.
Reinstalling the ODBC driver would be best if the errors are exclusively related to ADO and/or ODBC.
Another thing to test: Create a test.vbs file on the desktop, edited to read: Set test = CreateObject(“adodb.connection”)
If that file runs without error, but the vlax-create-object “adodb.connection” errors, then we know it is just the vlax libraries in AutoCAD. Hence, you'll need to reinstall AutoCAD.
MDAC 2.8 originally created ADO, but is built into XP, so is unable to be reinstalled. Dot Net 3.5 SP1 includes the ADO components, but is flagged as a critical update, so most computers have it. Still, it is something that can be reinstalled.
The calling layer is something like this: vlax-create-object, interfaces with Windows DCOM and probably RPC (if either of these were failing, Windows would be spitting out errors left and right), and creates an ADO object (adodb.dll, msado15.dll, msadoxx.dll). The ADO then access the ODBC objects (dll's listed in Data Sources, About). Then the dll for the data source is accessed (vfpodbc.dll / myodbc5.dll)
Copying over known good versions of these DLLs, and/or re-registering them would also be a good step before a general Windows reinstall.