Q: E_FAIL Status on Some Machines, Not Others I have a very simple VBA code in Excel that queries a MariaDB database, using ADO, and then copies that recordset into Excel. The problem is that when the code is run on some machines, it works fine, and on others it returns, "Data provider or other service returned an E_FAIL status." 
Dim sConn As String
Set adConn = New ADODB.Connection

If adConn.State = adStateClosed Then
    sConn = "Driver=MariaDB ODBC 3.0 Driver;" & _
        "Server=server;" & _
        "Database=database;" & _
        "User=user;" & _
        "Password=password;" & _
        "Option=3"
    adConn.ConnectionString = sConn
    adConn.Open
End If

Dim adRs As ADODB.Recordset
Set adRs = New ADODB.Recordset
    adRs.CursorLocation = adUseClient

Dim SQLQuery as String
SQLQuery = "SELECT * FROM table;"

adRs.Open SQLQuery, adConn, adOpenStatic, adLockPessimistic
    Worksheets("Sheet1").Range("A1").CopyFromRecordset adRs

Given that it works on some machines and not others, I imagine it may have to do with configurations or drivers on the computers themselves, rather than Excel, VBA, or SQL. Where should I look? All the machines are 64-bit, and the driver is a 64 bit driver. Is there something wrong in the code? In the connection string?

A: I cast the DATE fields as CHAR, and the error went away. I still don't know why some machines, running the same version of Windows, Excel, and the ODBC driver acted differently than others.

A: I coalesced NULLs to empty strings, and the error went away.
