Solved

Invalid scale value in stored procedure result

Posted on 2009-04-12
6
568 Views
Last Modified: 2012-05-06
I am trying to send alot of data to my sql table through a stored procedure. It's throwing me back an error "Brief Description: [Microsoft][ODBC SQL Server Driver]Invalid scale value" on the execute() line.
what exactly is this error?
How do I figure out which variable is causing this error?
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_TowerConn2_STRING
Command1.CommandText = "Csm56GetApps"
Command1.CommandType = 4
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Parameters.Append Command1.CreateParameter("@RETURN_VALUE", 3, 4)
Command1.Parameters.Append Command1.CreateParameter("@InterviewId", 3, 1,50,Command1__InterviewId)
Command1.Parameters.Append Command1.CreateParameter("@AppId", 3, 1,50,Command1__AppId)
Command1.Parameters.Append Command1.CreateParameter("@05", 3, 1,50,Command1__05)
Command1.Parameters.Append Command1.CreateParameter("@06", 135, 1,50,Command1__06)
Command1.Parameters.Append Command1.CreateParameter("@07", 3, 1,50,Command1__07)
Command1.Parameters.Append Command1.CreateParameter("@08", 3, 1,50,Command1__08)
Command1.Parameters.Append Command1.CreateParameter("@09", 3, 1,50,Command1__09)
Command1.Parameters.Append Command1.CreateParameter("@10", 3, 1,50,Command1__10)
Command1.Parameters.Append Command1.CreateParameter("@11", 11, 1,5,Command1__11)
Command1.Parameters.Append Command1.CreateParameter("@12", 11, 1,5,Command1__12)
Command1.Parameters.Append Command1.CreateParameter("@13", 11, 1,5,Command1__13)
Command1.Parameters.Append Command1.CreateParameter("@14", 11, 1,5,Command1__14)
Command1.Parameters.Append Command1.CreateParameter("@15", 11, 1,5,Command1__15)
Command1.Parameters.Append Command1.CreateParameter("@16", 11, 1,5,Command1__16)
Command1.Parameters.Append Command1.CreateParameter("@17", 11, 1,5,Command1__17)
Command1.Parameters.Append Command1.CreateParameter("@18", 11, 1,5,Command1__18)
Command1.Parameters.Append Command1.CreateParameter("@19", 11, 1,5,Command1__19)
Command1.Parameters.Append Command1.CreateParameter("@20", 11, 1,5,Command1__20)
Command1.Parameters.Append Command1.CreateParameter("@21", 3, 1,50,Command1__21)
Command1.Parameters.Append Command1.CreateParameter("@22", 3, 1,50,Command1__22)
Command1.Parameters.Append Command1.CreateParameter("@23", 3, 1,50,Command1__23)
Command1.Parameters.Append Command1.CreateParameter("@24", 3, 1,50,Command1__24)
Command1.Parameters.Append Command1.CreateParameter("@25", 3, 1,50,Command1__25)
Command1.Parameters.Append Command1.CreateParameter("@26", 3, 1,50,Command1__26)
Command1.Parameters.Append Command1.CreateParameter("@27", 3, 1,50,Command1__27)
Command1.Parameters.Append Command1.CreateParameter("@28", 3, 1,50,Command1__28)
Command1.Parameters.Append Command1.CreateParameter("@29", 3, 1,50,Command1__29)
Command1.Parameters.Append Command1.CreateParameter("@30", 3, 1,50,Command1__30)
Command1.Parameters.Append Command1.CreateParameter("@31", 3, 1,50,Command1__31)
Command1.Parameters.Append Command1.CreateParameter("@32", 3, 1,50,Command1__32)
Command1.Parameters.Append Command1.CreateParameter("@33", 3, 1,50,Command1__33)
Command1.Parameters.Append Command1.CreateParameter("@34", 3, 1,50,Command1__34)
Command1.Parameters.Append Command1.CreateParameter("@35", 3, 1,50,Command1__35)
Command1.Parameters.Append Command1.CreateParameter("@36", 3, 1,50,Command1__36)
Command1.Parameters.Append Command1.CreateParameter("@37", 3, 1,50,Command1__37)
Command1.Parameters.Append Command1.CreateParameter("@38", 3, 1,50,Command1__38)
Command1.Parameters.Append Command1.CreateParameter("@39", 3, 1,50,Command1__39)
Command1.Parameters.Append Command1.CreateParameter("@40", 3, 1,50,Command1__40)
Command1.Parameters.Append Command1.CreateParameter("@41", 200, 1,1000,Command1__41)
Command1.Parameters.Append Command1.CreateParameter("@42", 200, 1,50,Command1__42)
Command1.Parameters.Append Command1.CreateParameter("@43", 200, 1,50,Command1__43)
Command1.Parameters.Append Command1.CreateParameter("@44", 200, 1,50,Command1__44)
Command1.Parameters.Append Command1.CreateParameter("@45", 200, 1,50,Command1__45)
Command1.Parameters.Append Command1.CreateParameter("@46", 200, 1,50,Command1__46)
Command1.Parameters.Append Command1.CreateParameter("@47", 200, 1,50,Command1__47)
Command1.Parameters.Append Command1.CreateParameter("@48", 200, 1,50,Command1__48)
Command1.Parameters.Append Command1.CreateParameter("@49", 200, 1,50,Command1__49)
Command1.Parameters.Append Command1.CreateParameter("@50", 200, 1,50,Command1__50)
Command1.Parameters.Append Command1.CreateParameter("@51", 200, 1,50,Command1__51)
Command1.Parameters.Append Command1.CreateParameter("@52", 200, 1,50,Command1__52)
Command1.Parameters.Append Command1.CreateParameter("@53", 200, 1,50,Command1__53)
Command1.Parameters.Append Command1.CreateParameter("@54", 200, 1,50,Command1__54)
Command1.Parameters.Append Command1.CreateParameter("@55", 200, 1,50,Command1__55)
Command1.Parameters.Append Command1.CreateParameter("@56", 200, 1,50,Command1__56)
Command1.Parameters.Append Command1.CreateParameter("@57", 200, 1,50,Command1__57)
Command1.Parameters.Append Command1.CreateParameter("@58", 200, 1,50,Command1__58)
Command1.Parameters.Append Command1.CreateParameter("@59", 200, 1,50,Command1__59)
Command1.Parameters.Append Command1.CreateParameter("@60", 200, 1,50,Command1__60)
Command1.Parameters.Append Command1.CreateParameter("@61", 200, 1,50,Command1__61)
Command1.Parameters.Append Command1.CreateParameter("@62", 200, 1,50,Command1__62)
Command1.Parameters.Append Command1.CreateParameter("@63", 200, 1,50,Command1__63)
Command1.Parameters.Append Command1.CreateParameter("@64", 200, 1,50,Command1__64)
Command1.Parameters.Append Command1.CreateParameter("@65", 200, 1,50,Command1__65)
Command1.Parameters.Append Command1.CreateParameter("@66", 200, 1,50,Command1__66)
Command1.Parameters.Append Command1.CreateParameter("@67", 200, 1,50,Command1__67)
Command1.Parameters.Append Command1.CreateParameter("@68", 200, 1,50,Command1__68)
Command1.Parameters.Append Command1.CreateParameter("@69", 200, 1,50,Command1__69)
Command1.Parameters.Append Command1.CreateParameter("@70", 200, 1,50,Command1__70)
Command1.Parameters.Append Command1.CreateParameter("@71", 135, 1,50,Command1__71)
Command1.Parameters.Append Command1.CreateParameter("@72", 135, 1,50,Command1__72)
Command1.Parameters.Append Command1.CreateParameter("@73", 135, 1,50,Command1__73)
Command1.Parameters.Append Command1.CreateParameter("@74", 135, 1,50,Command1__74)
Command1.Parameters.Append Command1.CreateParameter("@75", 135, 1,50,Command1__75)
Command1.Parameters.Append Command1.CreateParameter("@76", 135, 1,50,Command1__76)
Command1.Parameters.Append Command1.CreateParameter("@77", 135, 1,50,Command1__77)
Command1.Parameters.Append Command1.CreateParameter("@78", 135, 1,50,Command1__78)
Command1.Parameters.Append Command1.CreateParameter("@79", 135, 1,50,Command1__79)
Command1.Parameters.Append Command1.CreateParameter("@80", 135, 1,50,Command1__80)
Command1.Parameters.Append Command1.CreateParameter("@81", 6, 1,50,Command1__81)
Command1.Parameters.Append Command1.CreateParameter("@82", 6, 1,50,Command1__82)
Command1.Parameters.Append Command1.CreateParameter("@83", 6, 1,50,Command1__83)
Command1.Parameters.Append Command1.CreateParameter("@84", 6, 1,50,Command1__84)
Command1.Parameters.Append Command1.CreateParameter("@85", 6, 1,50,Command1__85)
Command1.Parameters.Append Command1.CreateParameter("@86", 6, 1,50,Command1__86)
Command1.Parameters.Append Command1.CreateParameter("@87", 6, 1,50,Command1__87)
Command1.Parameters.Append Command1.CreateParameter("@88", 6, 1,50,Command1__88)
Command1.Parameters.Append Command1.CreateParameter("@89", 6, 1,50,Command1__89)
Command1.Parameters.Append Command1.CreateParameter("@90", 6, 1,50,Command1__90)
Command1.Parameters.Append Command1.CreateParameter("@91", 14, 1,50,Command1__91)
Command1.Parameters.Append Command1.CreateParameter("@92", 14, 1,50,Command1__92)
Command1.Parameters.Append Command1.CreateParameter("@93", 14, 1,50,Command1__93)
Command1.Parameters.Append Command1.CreateParameter("@94", 14, 1,50,Command1__94)
Command1.Parameters.Append Command1.CreateParameter("@95", 14, 1,50,Command1__95)
Command1.Parameters.Append Command1.CreateParameter("@A", 11, 1,15,Command1__A)
Command1.Parameters.Append Command1.CreateParameter("@B", 200, 1,50,Command1__B)
Command1.Parameters.Append Command1.CreateParameter("@C", 200, 1,50,Command1__C)
Command1.Parameters.Append Command1.CreateParameter("@D", 200, 1,50,Command1__D)
Command1.Parameters.Append Command1.CreateParameter("@E", 200, 1,50,Command1__E)
Command1.Parameters.Append Command1.CreateParameter("@F", 200, 1,50,Command1__F)
Command1.Parameters.Append Command1.CreateParameter("@G", 200, 1,50,Command1__G)
Command1.Parameters.Append Command1.CreateParameter("@H", 200, 1,50,Command1__H)
Command1.Parameters.Append Command1.CreateParameter("@I", 200, 1,50,Command1__I)
Command1.Parameters.Append Command1.CreateParameter("@J", 200, 1,50,Command1__J)
Command1.Parameters.Append Command1.CreateParameter("@K", 200, 1,50,Command1__K)
Command1.Parameters.Append Command1.CreateParameter("@L", 200, 1,50,Command1__L)
Command1.Parameters.Append Command1.CreateParameter("@M", 200, 1,50,Command1__M)
Command1.Parameters.Append Command1.CreateParameter("@ToDelete", 11, 1,15,Command1__ToDelete)
Command1.Execute()
 
%>

Open in new window

0
Comment
Question by:rivkamak
  • 4
  • 2
6 Comments
 
LVL 9

Accepted Solution

by:
dan_neal earned 500 total points
ID: 24127748
Do you have access to provide the datatypes of each of these parameters?
Are you able to execute the stored procedure itself via query analyser or management studio?
Have you verified the parameters your passing are correct?
0
 

Author Comment

by:rivkamak
ID: 24131373
I'm trying to set up the update statement based off a stored procedure sent to me by my database administrator.
this version was automatically compilated from Dreamweaver based on the stored procedure.
How can I find out which line exactly is throwing the error?
0
 
LVL 9

Assisted Solution

by:dan_neal
dan_neal earned 500 total points
ID: 24134420
It is likely being caused by the values passed one or more of the parameters when calling the SP and is why I asked if you have verified the needed parameters and the values the form is passing to them.  What may be easiest since you are not in control of the db you are working with is to send your dba the list of parameters that causes the error in your form and ask to execute the SP manually.  This will likely be something he/she will need to correct or at least provide you with more information on what parameters are incorrect or incorrectly formated.
0
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 

Author Comment

by:rivkamak
ID: 24193859
My database manager tried running a trace but the SP informaiton did not even hit the server.
He said these variable are supposed to be @91,@92,@93,@94,@95 are all decimal (10,4)
My script has those lines like this.

Dim Command1__91
Command1__91 = 0.0
if(Request("91") <> "") then Command1__91 = Request("91")
Dim Command1__92
Command1__92 = 0.0
if(Request("92") <> "") then Command1__92 = Request("92")
Dim Command1__93
Command1__93 = 0.0
if(Request("93") <> "") then Command1__93 = Request("93")
Dim Command1__94
Command1__94 = 0.0
if(Request("94") <> "") then Command1__94 = Request("94")
Dim Command1__95
Command1__95 = 0.0
if(Request("95") <> "") then Command1__95 = Request("95")
Command1.Parameters.Append Command1.CreateParameter("@91", 14, 1,10,Command1__91)
Command1.Parameters.Append Command1.CreateParameter("@92", 14, 1,10,Command1__92)
Command1.Parameters.Append Command1.CreateParameter("@93", 14, 1,10,Command1__93)
Command1.Parameters.Append Command1.CreateParameter("@94", 14, 1,10,Command1__94)
Command1.Parameters.Append Command1.CreateParameter("@95", 14, 1,10,Command1__95)
Any ideas what it might be?
0
 
LVL 9

Expert Comment

by:dan_neal
ID: 24194568
Have you viewed the actual content of the fields you applying to these parameters?  Verify that they are numeric values?
0
 
LVL 9

Expert Comment

by:dan_neal
ID: 24194816
How does you changing the parameters to match your data (which I have been telling you to verify that your data and parameters match) justify closing this question without awarding any points when you took the suggestions offered to you.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question