CopyFromRecordset
Posted: 02 May 2018, 11:36
When you try to use the CopyFromRecordset method of Excel the AHK returns the following error: 'No such interface supported'.
Does anyone know why this error occurred?
The code I'm using is the one below.
Does anyone know why this error occurred?
The code I'm using is the one below.
Code: Select all
currentDB := DBA.DataBaseFactory.OpenDataBase("ADO", "Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=##.###.#.###)(PORT = ####))(CONNECT_DATA=(SERVER=########)(SERVICE_NAME = ###)));User Id=######;Password=#######;")
rs := currentDB.OpenRecordSet(query)
if(!rs.EOF) {
Xl := ComObjCreate("Excel.Application")
Xl.Workbooks.Open(ListaRelatorios ".xlsx")
Xl.Visible:=true
Xl := Xl.Workbooks(ListaRelatorios ".xlsx")
Xl.Sheets("Sem Num.Causa").Range("A2").CopyFromRecordset(rs, 10000, 10000)
}