November 14, 2005 at 11:44 am
Hi, I'm getting a "type mismatch" (line highlighted in red) when creating an input ado parameter. I am trying to insert a row that contains a money(8) column. The code to create the parameter is as follows:
Sub CreateMoneyParam(command, paramName, value)
dim param
param = command.CreateParameter(paramName, adCurrency, adParamInput, 8, value)
command.Parameters.Append(param)
End Sub
adCurrency is = 6. I am using the SQLOleDB driver and SQL Server 2K. Does anyone know why this code is returning this error.
Thanks.
November 14, 2005 at 1:17 pm
i think it's just the missing SET command for an Object; otherwise your syntax is exactly what i use.
SET param = command.CreateParameter(paramName, adCurrency, adParamInput, 8, value)
otherwise it might be the size paramter of 8 that you are assigning; leave that blank:
Set paramObj = CmdObj.CreateParameter("@HOPWATBLKEY", adInteger, adParamInput, , HOPWAobj.acttblkey)
Lowell
November 14, 2005 at 1:47 pm
Duh! Of course! Thanks.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply