Thanks for the article. I found it very interesting and helpful.
I still have this problem:
' Parameter 1
sParmName1 = "@Cusip"
ocommand.Parameters.Append ocommand.CreateParameter(sParmName1, adVarChar, adParamInput)
params(sParmName1).Value = sSymbol
' Parameter 2
sParmName2 = "@Price" '
Set ADOprm = ocommand.CreateParameter(sParmName2, adNumeric, adParamInput)
ocommand.Parameters.Append ADOprm
ocommand.Parameters(sParmName2).Value = sPrice
The stored procedure is:
create procedure dbo.UpdateLastPriceRaw
(
@Cusip VARCHAR(15),
@Price NUMERIC(17,9)
)
AS
Parameter 1 works fine - but Parameter 2 brings the following error:
The precision is invalid.
?err.Number
-2147467259
If I use the params.refrsh method it works fine (commenting out the ADOPrm SET line)
Is there a way to find out what the error means and how to solve it without using params.refresh?