I am trying to run a Stored Procedure in ASP, but I get the following
error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
[Microsoft][ODBC SQL Server Driver]Invalid scale value
/comparison/gmacro.asp, line 86
My code relating to this is:
'Parameter 0 is the stored procedure Return code.
sParmName = "Return"
'createParameter(Name, Type, Direction, Size, Value)
Set SQLAccessPrm = SQLAccess.CreateParameter(sParmName, 3, 4)
SQLAccess.Parameters.Append SQLAccessPrm
SQLAccess.Parameters(sParmName).Value = -1
'Parameter 1 is the setting for the stored procedure input parameter.
sParmName = "practiceID"
Set SQLAccessPrm
SQLAccess.CreateParameter(sParmName,200,1,25,Session("UserID"))
SQLAccess.Parameters.Append SQLAccessPrm
'Parameter 2 is the setting for the stored procedure input parameter.
sParmName = "DataSourceID"
Set SQLAccessPrm = SQLAccess.CreateParameter(sParmName,131,1,25,0)
SQLAccess.Parameters.Append SQLAccessPrm
The error directs us to the following line: Set SQLAccessPrm
SQLAccess.CreateParameter(sParmName,131,1,25,0)
Any idea why I am getting this error?
Would it make a difference that the parameter that is causing problems is
of
type integer?
The parameter that is of type varchar seems to be working fine.
Many Thanks