CopyFromRecordset

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
ramonstart
Posts: 16
Joined: 26 Apr 2016, 09:00

CopyFromRecordset

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.

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)
}
User avatar
ramonstart
Posts: 16
Joined: 26 Apr 2016, 09:00

Re: CopyFromRecordset

15 May 2018, 06:58

Can someone help me?

Please :|
User avatar
Delta Pythagorean
Posts: 628
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

Re: CopyFromRecordset

16 May 2018, 23:06

This is the Scripts And Functions sub forum, you need to put this under the Help sub forum.

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat


Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], luvini, Nextron, peter_ahk and 190 guests