473,473 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

i have a problem about fields of executed query in vba

1 New Member
i have two problems:

1) when i execute this query in sql 2005; i get more than 10.000 results. However i get only 1087 results in vba excel. why would it be so?

2) i have three collections defined in the code. and want to fill them with the corresponding fields in the query.. that's; tarih_list as field(1); vkgs_list as field(2); getiri_list as field(3).. how can i do that?

thanks in advance..

Expand|Select|Wrap|Line Numbers
  1. ---
  2. Private Sub CommandButton1_Click()
  3.  
  4. Dim MyConnObj As New ADODB.Connection
  5. Dim myRecSet As New ADODB.Recordset
  6. Dim vkgs_list As New Collection
  7. Dim getiri_list As New Collection
  8. Dim tarih_list As New Connection
  9.  
  10. MyConnObj.Open "Provider = sqloledb;" & "Data Source=192.168.0.99;" & "Initial Catalog=BDDK_SERVER;" & "User ID=RISKUSER;" & "Password=RISKUSER;"
  11. sqlStr = "select TARIH_DT, VKGS, GETIRI from VERIMEGRISI where VERIMEGRISI = 'USD.GOV' AND TARIH_DT > 20080501 ORDER BY TARIH_DT DESC, VKGS ASC"
  12.  
  13. myRecSet.Open sqlStr, MyConnObj, adOpenKeyset
  14.  
  15. For i = 1 To myRecSet.RecordCount
  16. '??
  17. '??
  18. '??
  19.  
  20. Next
  21. MyConnObj.Close
  22. End Sub
  23.  
  24. ---
Aug 20 '10 #1
0 935

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Michael Donahoe | last post by:
I have a database that I inherited that has query in it that has hidden fields when it is in design view. Datasheet view shows the fields and when I switch back to design view it appears as though...
1
by: Matthew | last post by:
Hey, I have built a form that has certain combo and text boxes on it, which a user specifies his criteria and then clicks on a search button to run a query based on that criteria. To build to...
6
by: Brian | last post by:
Hello, Basically, I'm running a query on a form's activation, and I'd like to have the results of the query be placed into other fields on the same form automatically. Does anybody know how...
8
by: Dixie | last post by:
I have the results of a query to send to a mailmerge with Word 2000. The query produces say 6 to 8 records, where only 1 of the fields is different from record to record. I can only have one...
3
by: Hutch | last post by:
I have a field called "Model" and another field called "Revision" I have seen it done where both fields are combined after the query runs, but for the life of me cant figure it out, i'm pretty sure...
8
by: daicamad | last post by:
I have this: SELECT UserInfo.EmpID, UserInfo.FirstName, UserInfo.LastName, Sum(SoldItems.Commision) AS TotalCommission, Sum(TIP.TipAmt) AS TotalTip,(SELECT Sum(SoldItems.Commision) AS MyCommission...
3
by: gbergeson | last post by:
Please be patient with me. I'm a newbie and the LAN Nazi's have blocked this site. This means I can only asked questions from home and, of course, the code for this project is at work. I'm...
1
by: christianlott1 | last post by:
I used the code here: http://groups.google.com/group/comp.databases.ms-access/browse_thread/thread/4945db8db0321704/b918febe2ab9eda5?lnk=gst&q=list+fields++of+query&rnum=1&hl=en#b918febe2ab9eda5 ...
7
by: Ecohouse | last post by:
I'm working on a project that was dropped in my lap. It is in Access 2003. There are short time fields which get calculated values (eg. 1:30). But I will need to total up those values for...
0
by: whoopie | last post by:
Hi I am willing to save different fields from a DB . Fact is that according to the variable the user selects the output is different. The number of variables are very big ( all selectable from a...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.