View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Damian Carrillo[_3_] Damian Carrillo[_3_] is offline
external usenet poster
 
Posts: 19
Default Stubborn Array won't Populate from single ADODB.Connection Query

Thanks Joel, the MOVENEXT method worked perfectly. I really
appreciate your assistance.

On Aug 25, 9:17*am, Damian Carrillo wrote:
Never mind, there was a misspelling in the code. *I'll give this
another try and report back shortly. *I would try to consolidate the
queries into one, but I didn't understand how what you had written
before would accomplish the objective I was trying to reach. It was
basically creating one long query string consisting of several partial
queries, right?

On Aug 25, 1:31*am, Joel wrote:

You need to use a movenext. *I still think you should fix your DQL like I
recommended last time so you don't have to loop 5 times. *It significantly
slows down the code.


* *Let SQLquery = QueryUserInfo(x) 'Define source query
* *Set RecSet = Conn.Execute(SQLquery, , 1) 'Retrieve query value
* *Do until RecSet.Eof


* * * *For x = 0 To 5
* * * * * *Let SQLquery = QueryUserInfo(x) 'Define source query
* * * * * *Set RecSet = Conn.Execute(SQLquery, , 1) 'Retrieve query value
* * * * * *Let UserInfo(x) = RecSet.Fields.Item(0).Value 'Populate value
into field
* * * *Next x


* * * *RecSet.MobeNext
* *Loop