Hi Harlan,
I don't think the ODBC sources cause the problem, because in both computers
are the same. Moreover I am doing sql via VBA, as follows:
.....
......
strCon = "driver={Microsoft dBase Driver (*.dbf)};"
strCon = strCon & "driverid=277;dbq=" & Range("PATHTECOFIT")
cnBase.Open strCon
If Range("HISTO") = True Then
sqlCOL = "SELECT
RCCVCVE,RCCVPRO,RCCVDPR,RCCVUNI,RCCVKGS,RCCVPTU,RCCVPTS,RCCVDAT,RCCVCLI,RCCVCCL,RCCVNFC FROM RCCVE9704"
sqlCOL = sqlCOL + " WHERE RCCVLOT='" & Range("FILCLI") & "'"
vFil = vFil & " ORDER BY RCCVDAT"
sqlCOL = sqlCOL & vFil
rCOL.Open sqlCOL, cnBase, , , adCmdText
If rCOL.EOF Then
rCOL.Close
cnBase.Close
Exit Sub
Else
Range("a3").CopyFromRecordset rCOL
End If
rCOL.Close
End If
........
........
The code breaks and the message I have is it can't find the file
"RCCVE9704". As stated, it work fine in other (Excel 2007) computers, with
same ODBC drivers installed.
I would think it must be an option in Excel 2007 which enables accessing a
longer than 8 digits name when file is DOS . Could it be? (If I change the
name to RC9704 then it works fine!)
Kind regards,