Hi,
Can some body please help me figure out what is wrong with this code, i get the following error every time, what's wrong? thanx
Error Type:
ADODB.Command (0x800A0D5D)
Application uses a value of the wrong type for the current operation.
/dwprojects/newday/Step1.asp, line 33
Here's my code:
Also frm the above code line 31 maps to [varchar](50) datatype in the DBCode:<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!--#include file="Connections/cnNewDay.asp" --> <% Dim cmNewDay__CustomerName cmNewDay__CustomerName = "" if(Request.form("CustomerName") <> "") then cmNewDay__CustomerName = Request.form("CustomerName") Dim cmNewDay__product cmNewDay__product = "" if(Request.form("product") <> "") then cmNewDay__product = Request.form("product") Dim cmNewDay__unit_price cmNewDay__unit_price = "" if(Request.form("unitprice") <> "") then cmNewDay__unit_price = cLng(trim(Request.form("unitprice"))) Dim cmNewDay__quantity cmNewDay__quantity = "" if(Request.form("quantity") <> "") then cmNewDay__quantity = cLng(trim(Request.form("quantity"))) %> <% set cmNewDay = Server.CreateObject("ADODB.Command") cmNewDay.ActiveConnection = MM_cnNewDay_STRING cmNewDay.CommandText = "dbo.insert_NewDayOrder" cmNewDay.CommandType = 4 cmNewDay.CommandTimeout = 0 cmNewDay.Prepared = true cmNewDay.Parameters.Append cmNewDay.CreateParameter("@RETURN_VALUE", 3, 4) 31 cmNewDay.Parameters.Append cmNewDay.CreateParameter("@CustomerName", 200, 1,50,cmNewDay__CustomerName) 32 cmNewDay.Parameters.Append cmNewDay.CreateParameter("@product", 200, 1,100,cmNewDay__product) line 33 cmNewDay.Parameters.Append cmNewDay.CreateParameter("@unit_price", 131, 1,9,cmNewDay__unit_price) 34cmNewDay.Parameters.Append cmNewDay.CreateParameter("@quantity", 3, 1,4,cmNewDay__quantity) cmNewDay.Execute() %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> </body> </html>
line 32 maps to [varchar](100) datatype in the DB
line 33 maps to [numeric] datatype in the DB
line 34 maps to [int] datatype in the DB




Bookmarks