Page 1 of 1

CopyFromRecordset

Posted: 02 May 2018, 11:36
by ramonstart
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.

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)
}

Re: CopyFromRecordset

Posted: 15 May 2018, 06:58
by ramonstart
Can someone help me?

Please :|

Re: CopyFromRecordset

Posted: 16 May 2018, 23:06
by Delta Pythagorean
This is the Scripts And Functions sub forum, you need to put this under the Help sub forum.