it could be the way you are testing the value and the 1 and
100 are
dropping thru and they are invalid dates. I had this problem
once and
to test what I said said I replace the numeric values with
date values
and found that my testing was faulty.
Google createparamater and you get this link
http://www.w3schools.com/ado/met_comm_createparameter.asp
that explains
what 135 refers to. You may want 133.
lands1ide wrote:
> I am getting this error
> ADODB.Command error '800a0d5d'
>
> Application uses a value of the wrong type for the
current operation
> I am using an access database. I have checked my
database and the
> parameters to ensure they are the date type. I thing it
has someting
> to do with the length but Im not sure hoe to fix it.
Here is my
> Query. I was also wondering what this meant "param2",
135, 1, -1, im
> not good with code nut eager to learn.
>
>
> <!--#include
file="../../../Connections/DenQuality1.asp" -->
> <%
> var Recordset1__MMColParam = "1";
> if (String(Request.Form("stdate")) != "undefined"
&&
> String(Request.Form("stdate")) != "") {
> Recordset1__MMColParam = String(Request.Form("stdate"));
> }
> %>
> <%
> var Recordset1__MMColend = "100";
> if (String(Request.Form("enddate")) != "undefined"
&&
> String(Request.Form("enddate")) != "") {
> Recordset1__MMColend = String(Request.Form("enddate"));
> }
> %>
> <%
> var Recordset1_cmd = Server.CreateObject
("ADODB.Command");
> Recordset1_cmd.ActiveConnection = MM_DenQuality1_STRING;
> Recordset1_cmd.CommandText = "SELECT * FROM Nikki WHERE
[Date
> Reviewed] BETWEEN ? AND ?";
> Recordset1_cmd.Prepared = true;
>
>
Recordset1_cmd.Parameters.Append(Recordset1_cmd.CreateParameter("param
> 1", 135, 1, -1, Recordset1__MMColParam)); //
adDBTimeStamp
>
Recordset1_cmd.Parameters.Append(Recordset1_cmd.CreateParameter("param
> 2", 135, 1, -1, Recordset1__MMColend)); // adDBTimeStamp
>
> var Recordset1 = Recordset1_cmd.Execute();
> var Recordset1_numRows = 0;
> %>
> <%
> var Repeat1__numRows = -1;
> var Repeat1__index = 0;
> Recordset1_numRows += Repeat1__numRows;
> %>
--