Thread: ADODB.RecordSet
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
RW RW is offline
external usenet poster
 
Posts: 49
Default ADODB.RecordSet

And you may have to use RecSet(i).Value in your loop!

"RW" wrote:

Dan,

As far as I know there is no Execute method for the Recordset object.
Try recSet.Open sSql, ActDB instead

Also, the following URL will give you documentation on ADO, but you will
have to dig around:
http://msdn.microsoft.com/library/de...cadoobjmod.asp

Hope this helps,
Rosemary




"Dan Thorman" wrote:

Hi. I can't seem to find a good page defining all the methods available to
the ADODB RecordSet and how to use them. So, i'm working blind (as a newbie
without much VBA experience). I'm using Excel 2003, and an ADO connection to
an Oracle Database.

I tried this bit of code (with sSql as a previously defined SQL string, and
ActDB as a previously opened Database connection):

Dim recSet As ADODB.Recordset
Set recSet = New ADODB.Recordset

recSet.Execute (sSql, ActDB)

For i = 1 To iterator
Application.Worksheets("HOTPortfolio").Cells(j, 1) = recSet(i)
Next i

but i get an error that the line "recSet.Execute(sSql,ActDB)" is expecting
an =
What am I doing wrong? Can anyone point me in the direction of a good set of
definitions? (preferably in the style of the online Java Library)

Thanks!!