Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 01:43 PM
Chris Oakleaf
Guest
 
Posts: n/a
Default 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
  #2  
Old July 19th, 2005, 01:43 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: ASP recordset filter failure

You should apply this filter in your WHERE clause.

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




"Chris Oakleaf" <chris@oaksong.com> wrote in message
news:eed4d8.0406090819.6d48d7fa@posting.google.com ...[color=blue]
> 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[/color]


  #3  
Old July 19th, 2005, 01:43 PM
Mark Schupp
Guest
 
Posts: n/a
Default Re: ASP recordset filter failure

<%="complexid =" & rsComplex("ComplexID")%>

sb

<%"complexid =" & rsComplex("ComplexID")%>


--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"Chris Oakleaf" <chris@oaksong.com> wrote in message
news:eed4d8.0406090819.6d48d7fa@posting.google.com ...[color=blue]
> 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[/color]


  #4  
Old July 19th, 2005, 01:44 PM
Chris Oakleaf
Guest
 
Posts: n/a
Default Re: ASP recordset filter failure



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!
  #5  
Old July 19th, 2005, 01:44 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: ASP recordset filter failure

> Reply one submitted that I should not use .filter, but gave no reason[color=blue]
> 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.[/color]

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.)


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles