473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Recordset object holds insufficient fields

Expand|Select|Wrap|Line Numbers
  1. strQueryName = "qry_Resource_Details_By_Resource_Name"
  2.     Set dbs = CurrentDb()
  3.     Set qdf = dbs.QueryDefs(strQueryName)
  4.     qdf.Parameters(0) = cmbAllUniqueResource.Value
  5.  
  6.     Set rst = qdf.OpenRecordset()
  7.     MsgBox rst.Fields.Count
This is displaying 3, however, running the query directly is providing me with the correct output with 18 columns.

Any idea?
Mar 6 '10 #1
3 1348
NeoPa
32,556 Expert Mod 16PB
I can't see anything. But that's understandable as there is little here. I think the SQL of the query is necessary to try to determine what is going on. I can certainly think of nothing off the top of my head that might explain this.
Mar 7 '10 #2
Here goes the SQL query.
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM tbl_Resource_Master
  3. WHERE tbl_Resource_Master.Resource_Last_Name+", "+tbl_Resource_Master.Resource_First_Name=[?];
And the output is all the columns of the table, as expected.

And, very stupidly, I don't know what happened, it's working fine. And I really feel bad to bother you like this (though I could not find out the reason out yet).
Mar 7 '10 #3
NeoPa
32,556 Expert Mod 16PB
I'm not sure what could have caused the issue you describe, however I would look at your use of + for string concatenation as it propagates nulls. Check out Using "&" and "+" in WHERE Clause.

BTW Don't worry about probems disappearing. That happens quite often. It's generally a good thing ;)
Mar 8 '10 #4

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

Similar topics

12
by: Grahammer | last post by:
For some reason I am getting an error when trying to open a recordset on an Access database on my Win2K3 machine from my INDEX.ASP page, but the same code accesses the database fine when coming...
4
by: Thomas Scheiderich | last post by:
Why would you use the Recordset object over the Execute method of getting data from your Sql database. For example, I have the following: Execute Method...
4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
3
by: JingleBEV | last post by:
Hi all, I am trying not to use global variable to maintain data consistency. Some procedures and functions will require to pass the recordset object for processing and functions may also return...
1
by: Bala A | last post by:
I have an ActiveX EXE. One of the methods in this component has "Recordset Object" as input parameter which has to be passed by reference. I have to call this method from C# code. From C#, how...
1
by: munusoni | last post by:
Hi everyone, i am using ASP 3.0 to create web pages for a college project and i am having problems in using recordset object through session object to pass data to all web pages.Anyone tell me how...
0
ADezii
by: ADezii | last post by:
When you create an ADO Recordset, you should have some idea as to what functionality the Recordset does/does not provide. Some critical questions may, and should, be: Can I add New Records to the...
3
by: nilanjangm | last post by:
I have this following code snippet in Access 2007. strTempQuery = "qry_Resource_ID_By_Name" Set dbs = CurrentDb() Set qdf = dbs.QueryDefs(strTempQuery) qdf.Parameters(0) =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
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,...
0
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...

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.