Let me describe my problem. Within Excel I hit an oracle database and retreive some data and then I do a range("A1").copyFromRecordset dbRS, where dbRS is the recordset. I've done this a million times and it works fine. Then I decided to do the same thing for one query that was a little more complex, but it throws a very generic " " error
So I figure, something is wrong with the recordset, but not so. When I do this:
VB Code:
Do While Not dbRS.EOF Debug.Print (dbRS.Fields(1) & " " & dbRS.Fields(4) & " " & dbRS.Fields(5)) dbRS.MoveNext Loop
It prints out all the fields fine. I also decide that maybe it's the SQL statement, so I output the SQL statement to Golden (an Oracle client) and the query runs fine as well.
The error I get is the following:
VB Code:
There was an error Method 'CopyFromRecordset' of object 'Range' failed
So basically I was wondering if anybody can think of any reason why this recordset isn't working with the CopyFromRecorset function or if there is more I can do to troubleshoot. I can't show most of my code because there is a lot of private stuff in there, and I'm not sure how helpful it would be either. Please help if you can. Thank you.




Reply With Quote