troubleshooting Question

ADODB.Command error '800a0d5d'

Avatar of garethtnash
garethtnashFlag for United Kingdom of Great Britain and Northern Ireland asked on
ASPVB ScriptMicrosoft SQL Server 2008
15 Comments1 Solution4092 ViewsLast Modified:
Hello Experts, Help Please I'm getting the following error --

'ADODB.Command error '800a0d5d'
Application uses a value of the wrong type for the current operation.
/direct/includes/new-product-insert.asp, line 188'

Where Line 188 is;

CMDProductInsert.Parameters.Append CMDProductInsert.CreateParameter("@saletgiprice", 14, 1,10,CMDProductInsert__saletgiprice)

And CMDProductInsert__saletgiprice is defined as -

Dim CMDProductInsert__saletgiprice
CMDProductInsert__saletgiprice = "0.00"
if(UploadFormRequest("specialtgi") <> "") then CMDProductInsert__saletgiprice = Server.HTMLEncode(ProtectSQL(UploadFormRequest("specialtgi")))

The value I'm trying to insert in 10.00

FYI My database table is -

CREATE TABLE [dbo].[Direct-Product-Price](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[Product-ID] [int] NOT NULL,
	[Normal-Price] [decimal](10, 2) NOT NULL,
	[Special-Price] [decimal](10, 2) NOT NULL


ALTER TABLE [dbo].[Direct-Product-Price] ADD  DEFAULT ('0.00') FOR [Normal-Price]

ALTER TABLE [dbo].[Direct-Product-Price] ADD  DEFAULT ('0.00') FOR [Special-Price]

AND the section of the SP doing the Insert into the table reads like -

insert into dbo.[Direct-Product-Price]([Product-ID],[Normal-Price], [Special-Price])
values(@productid, @normaltgiprice, @saletgiprice)

What am I missing??

Thank you
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros