You're using type 200 (adVarChar), and you've limited
yourself to three
characters. If "seats" has more than three characters, you
will get this
error. You may get this error because you used NVARCHAR,
which is Unicode.
That's type 202 (adVarWChar).
"trinitisys" <webforumsuser@macromedia.com> wrote in
message
news:e8ea21$aia$1@forums.macromedia.com...
> Sup all...
>
> Since I upgraded to dw 8.0.2 weird things have been
happening with the
> recordsets that worked perfectly fine in 8.0.1. I
created a page with
> some new simple query parameter driven recordsets on it
and now all of a
> sudden I keep getting the following error.
>
> ADODB.Command error '800a0d5d'
>
> Application uses a value of the wrong type for the
current operation.
>
> /showcase/vehicle_edit.asp, line 179
>
> When I test the recordsets they work fine. When I try
them live they
> don't. I need someone's help because I have lost a lot
of time trying to
> find out what's wrong. The database columns of both
recordsets is
> nvarchar(3). I am stumped and severely frustrated. Here
is the recordset
> code from the page.
>
> <%
> var rsSeats__MMColParam = "NOT";
> if (String(rsMySpecificRide("Seats")) != "undefined"
&&
> String(rsMySpecificRide("Seats")) != "") {
> rsSeats__MMColParam = String(rsMySpecificRide("Seats"));
> }
>
> %>
> <%
> var rsSeats_cmd = Server.CreateObject ("ADODB.Command");
> rsSeats_cmd.ActiveConnection = MM_connShowcase_STRING;
> rsSeats_cmd.CommandText = "SELECT VendorCode, VendorName
FROM
> dbo.ShowcaseVendors WHERE VendorCode = ?";
> rsSeats_cmd.Prepared = true;
> - LINE 179 ->
>
rsSeats_cmd.Parameters.Append(rsSeats_cmd.CreateParameter("param1",
200,
> 1, 3, rsSeats__MMColParam)); // adVarChar
>
> var rsSeats = rsSeats_cmd.Execute();
> var rsSeats_numRows = 0;
> %>
>
> Regards,
>
> Darin
>