|
 |
access_asp thread: Filter Recordset Based on Date Greater Than Another Date
Message #1 by "Eric Levine" <eric@d...> on Thu, 18 Apr 2002 09:09:07 -0400
|
|
Good morning,
Perhaps someone could help me. I am needing to Filter a recordset based
on a date being greater than another date.
For Example, Show only those customer records that have logged onto the
system after a given date.
I am trying to use the Filter command but am receiving the following
error:
ADODB.Recordset error '800a0bb9' : Arguments are of the wrong type, are
out of acceptable range, or are in conflict with one another.
My ASP code is the following:
rsCustomers.Filter = "last_login >" & rsStats("date_traffic")
Both last_login and date_traffic are Date/Time Fields in an Access DB.
Could anyone offer me some assistance on the correct syntax? Thanks
much.
Regards,
Eric
Message #2 by "Ken Schaefer" <ken@a...> on Fri, 19 Apr 2002 12:39:17 +1000
|
|
For your error, please see my FAQ:
http://www.adopenstatic.com/faq/800a0bb9.asp (800a0bb9 Error Message when
applying a filter to a recordset)
My suggested solution:
<%
strSQL = _
"SELECT field1, field2, field3 " & _
"FROM table1 " & _
"WHERE last_login > #" & rsStats("date_traffic") & "#"
objRS.Open strSQL, objConn, adOpenForwardOnly, adLockReadOnly, adCmdText
%>
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Eric Levine" <eric@d...>
Subject: [access_asp] Filter Recordset Based on Date Greater Than Another
Date
: Good morning,
:
: Perhaps someone could help me. I am needing to Filter a recordset based
: on a date being greater than another date.
:
: For Example, Show only those customer records that have logged onto the
: system after a given date.
:
: I am trying to use the Filter command but am receiving the following
: error:
:
: ADODB.Recordset error '800a0bb9' : Arguments are of the wrong type, are
: out of acceptable range, or are in conflict with one another.
:
: My ASP code is the following:
:
: rsCustomers.Filter = "last_login >" & rsStats("date_traffic")
:
: Both last_login and date_traffic are Date/Time Fields in an Access DB.
:
: Could anyone offer me some assistance on the correct syntax? Thanks
: much.
|
|
 |