LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
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




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB Connection fi.or.jp.de Excel Worksheet Functions 0 September 9th 09 09:23 PM
How to populate VBA Variables from ADODB.Connection Results? Damian Carrillo[_3_] Excel Programming 4 August 21st 09 08:18 PM
Set cnn = New ADODB.Connection burl_h Excel Programming 4 February 17th 09 06:55 PM
ADODB.Connection Bogdan Excel Programming 7 July 16th 07 03:42 PM
ADODB.Connection Jez[_7_] Excel Programming 0 October 13th 06 12:02 PM


All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"