Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem passing parameter to stored procedure

Status
Not open for further replies.

mako

Programmer
Apr 6, 2000
11
MY

Hi, I'm having some problems with passing a parameter to a stored procedure. Any help is greatly appreciated.

My code :

adCmdStoredProc = 4
adParamReturnValue = 4
adParaminput = 1
adParamOutput = 2
adInteger = 3
adVarChar = 200

Set Cmd = Server.CreateObject("ADODB.Command")
Set Cmd.ActiveConnection = Conn

Cmd.CommandText = "WebRptGetProduct"
Cmd.CommandType = adCmdStoredProc
Cmd.Parameters.Append Cmd.CreateParameter("RETURN_VALUE", adInteger, adParamReturnValue, 4)
Cmd.Parameters.Append Cmd.CreateParameter("@IssNo", adInteger, adParamInput, , 1)
Set rsProduct = Cmd.Execute


I get this error message:

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E07)
Error converting data type int to smallint.

 
HI

Try

Cmd.Parameters.Append Cmd.CreateParameter("@IssNo", adSmallInt, adParamInput, 2, 1)

Cheers
 

Thanks but I still get the same error. :-/
Wonder what's wrong???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top