CopyFromRecordset

Get help with using AutoHotkey 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: 567
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Somewhere in the US

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].......: 1.1.33.02 Unicode 64-bit
- [OS].........: Windows 10.0.18362
- [GITHUB]...: github.com/DeltaPyth
- [PAYPAL]....: paypal.me/DelPyth
- [DISCORD]..: Delta#3324

Remember to use [code]CODE[/code] for your multi-line scripts.
Stay safe, stay inside, and remember to wash your hands for 20 seconds!

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], boiler, cheatH12, Google [Bot], mikeyww, Pavel, renega, thebat and 60 guests