Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
fgeorge
Starting Member
6 Posts |
Posted - 2005-02-05 : 10:50:56
|
I have a field called dependants and its numeric , length 9 in my SQL Server Table.I have a stored procedure that has a parameter which accepts a value for dependants..the code is below;Command1.Parameters.Append Command1.CreateParameter("@dependants", 139, 1,9,Command1__dependants)but on the line above i get the following error;ADODB.Command (0x800A0D5D)Application uses a value of the wrong type for the current operation.Can anyone tell me what the problem is and the solution.?Thanks |
|
sudheesh_k_s
Starting Member
10 Posts |
Posted - 2005-02-09 : 05:07:25
|
Numeric data type requires Scale and precision I think.Dim cmdObj As ADODB.Command Set cmdObj = New ADODB.Command Dim paramObj As ADODB.Parameter Set paramObj = New ADODB.ParameterWith cmdObj Set paramObj = .CreateParameter("Dependants", adNumeric, adParamInput, , variable) paramObj.Precision = 7 paramObj.NumericScale = 2 .Parameters.Append paramObjend with |
|
|
|
|
|