excel - QueryTables.Add application error -


sorry if quite basic q - vb not spend majority of time...

here's code i'm stuck on - (excel 2007)

    set qt = activesheet.querytables.add(connection:=str1, destination:=range("schedule!a4"), sql:=sqlstring)     qt.name = "tequery"     qt.refresh <-- error thrown on line 

when call refresh, 1004: application-defined or object-defined error, seems generic of error me figure out might issue.

in locals window can see qt , activesheet.querytables objects behaving expect (non-null etc.), , i've checked query text returns sensible result when run @ data source. ideas?

eta - i've noticed oracle provider ole db missing data connections wizard - new oracle client 11.2.0 install - got new machine since last used macro...could problem?

glad answering own question once :)

i had 64-bit client installed, excel 2007 couldn't connect, it's 32-bit application , required 32-bit client drivers.

still - shame generic error message!


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -