Hi All,
I've created an Excel Macro that has the following code:
con.Execute "INSERT INTO Estr_Materiais SELECT * FROM OPENROWSET ('Microsoft.Jet.OLEDB.4.0','Excel 8.0;HDR=YES;IMEX=1;Database=" & caminhoExport & arquivoExport & "','SELECT CodZFoccus_IV, CodInterno_IV, CodZFoccus_IF, CodInterno, Quantidade, Unid, Descricao, Now() AS Data FROM [MatImport$]');"
When I execute this code accessing a local SQL Server, it's work fine. But, when I execute macro accessing a remote SQL Server I receive the following error message:
" ... '-2147217900 (80040e14)': OLE DB Provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not give any information about the error."
Any help will be precious!!!
Best regards,
JV.
Bookmarks