473,402 Members | 2,050 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,402 software developers and data experts.

ASP recordset filter failure

With the following code snippet:

<%="complexid =" & rsComplex("ComplexID")%>
<% rsPhoto.filter = "complexID =" & rsComplex("ComplexID") %>
<%response.Write("<br>ID: " & rsPhoto("complexID"))%>
I get an 80020009 error on the last line.

The first line appears in the HTML output as complex=589, so I know
that there is a valid value available for the filter.

This worked once and hasn't worked since.

The rsPhoto recordset is viewable in a seperate page. The complexID in
the associated table has a value of 561 in the complexID column.

Why would this fail?

Comments......
TIA
Jul 19 '05 #1
4 3479
You should apply this filter in your WHERE clause.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Chris Oakleaf" <ch***@oaksong.com> wrote in message
news:ee************************@posting.google.com ...
With the following code snippet:

<%="complexid =" & rsComplex("ComplexID")%>
<% rsPhoto.filter = "complexID =" & rsComplex("ComplexID") %>
<%response.Write("<br>ID: " & rsPhoto("complexID"))%>
I get an 80020009 error on the last line.

The first line appears in the HTML output as complex=589, so I know
that there is a valid value available for the filter.

This worked once and hasn't worked since.

The rsPhoto recordset is viewable in a seperate page. The complexID in
the associated table has a value of 561 in the complexID column.

Why would this fail?

Comments......
TIA

Jul 19 '05 #2
<%="complexid =" & rsComplex("ComplexID")%>

sb

<%"complexid =" & rsComplex("ComplexID")%>
--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Chris Oakleaf" <ch***@oaksong.com> wrote in message
news:ee************************@posting.google.com ...
With the following code snippet:

<%="complexid =" & rsComplex("ComplexID")%>
<% rsPhoto.filter = "complexID =" & rsComplex("ComplexID") %>
<%response.Write("<br>ID: " & rsPhoto("complexID"))%>
I get an 80020009 error on the last line.

The first line appears in the HTML output as complex=589, so I know
that there is a valid value available for the filter.

This worked once and hasn't worked since.

The rsPhoto recordset is viewable in a seperate page. The complexID in
the associated table has a value of 561 in the complexID column.

Why would this fail?

Comments......
TIA

Jul 19 '05 #3


Reply one submitted that I should not use .filter, but gave no reason
for not using a valid recordset method.

Reply two failed to realize that the first line of code posted the
filter sql string and is the equivalent of response.write.

Line two of the code is where the filter actually occurs.

Would anyone else have any comments.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
> Reply one submitted that I should not use .filter, but gave no reason
for not using a valid recordset method.

Reply two failed to realize that the first line of code posted the
filter sql string and is the equivalent of response.write.


What do you want for free? Shall we cook you lunch as well? Wipe your
mouth afterwards?

First, explain why ASP (which is processed ONCE) should go to the database,
get the whole table, send it all back over to ASP, so that you can say "oh,
wait, I only wanted these four rows." This is EXTREMELY wasteful!

Second, if you want us to properly evaluate the error, you might consider
posting the TEXT of the error message. I don't know how well your brain
works, but I haven't memorized every single error code and its corresponding
error message (never mind that many error codes, including the one you
posted, can have multiple error messages).

Third, if you did a search for 80020009 yourself, you might have found
possible reasons for the problem. Just because I didn't go out of my way to
explain why you shouldn't use "a valid recordset method" doesn't mean that
my advice is worthless. I also didn't go out of my way to explain why you
should avoid ADODB.Recordset because, like .filter, you don't need to use it
at all.

You might try being a little grateful for help that is being offered by
volunteers, instead of being snotty about how miserably we failed you.

--
http://www.aspfaq.com/
(Reverse address to reply.)
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: U N Me | last post by:
I have a continuous form that lists records from a query. One of the columns is an amount field, In the footer of the form I place a text box that displays the total (sum) of the amount. The...
0
by: CFW | last post by:
I thought this was going to be easy but I'm missing something . . . I need to open an ADODB recordset using the recordset source for a list box on my for. When my form opens, the list box ADODB...
11
by: Ian Ornstein | last post by:
in posting http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&newwindow=1&selm=bmEK9.43452%24lj.1060600%40read1.cgocable.net Lyle showed us that an ADODB.Recordset can be created and attached to a...
2
by: Patrick Gonzalez | last post by:
Is it possible to use the built-in filter functions (ie. "Filter by Selection", etc..) when a form's recordsource has been set to a recordset object during the load event. When I try to do this, I...
2
by: S. van Beek | last post by:
Dear reader, I am using the following code:
2
by: ajspacemanspiff | last post by:
I currently have a solution that requires 2 sub queries, where each of them is convereted into a crosstab query and then I join the crosstab queries to a result. I would like to make this more...
4
by: ufgator1978 | last post by:
Hi All, First off I'd like to mention that I know this should be done in ADO.NET, but I have been asked to do it in regular ADO. =( Having said that, here is the problem I am experiencing... ...
11
by: jason.teen | last post by:
Hi, I dont seem to be able to get this Filter right on my RecordSet for some reason. I have this code: Dim rs As Recordset Set rs = CurrentDb().OpenRecordset("SELECT DISTINCT Product,
5
by: akselo | last post by:
Hi there good folks, I am trying to populate a column in a table with a number incrementing for each class (as set by another field; 176 different classes in table of 150,000 records representing...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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.