I am trying to execute a SQL Server 2000 stored procedure in a Visual Basic 6.0 program. I am getting the following error and don’t know how to fix it.
-2147467259 The precision is invalid
On the SQL Server the field name is RecordNum. RecordNum is a numeric size 9 with a precision of 18. Here is the code for the stored procedure
CREATE Procedure SpGetRecordNum
(
@vRecordNum numeric OUTPUT
)
As
select @vRecordNum=max(RecordNum) from RecEntry
return
GO
I am getting the error on the execute statement. Here is the code on VB side
comGetRecordNum.Parameters.Append comGetRecordNum.CreateParameter("@vRecordNum", adNumeric, adParamOutput, 9)
comGetRecordNum.Execute
How can I fix this error?