Create Procedure DBO.SP_INSERTSO (@cust_name varchar (120)) as begin insert insto dbo.so (cust_name) VALUES (@cust_name)
END asp: set cmd = server.CreateObject ( "adodb.command") set cmd.ActiveConnection = conn cmd.CommandText = "{call sp_InsertSo (?)}" Cmd.Parameters.Append cmd.CreateParameter ( "@ cust_name", adInteger , Adparaminput) CMD ("@ Cust_Name") = "999" cmd.execute ()
Adodb.command error '800A0bb9' parameter type is incorrect, or is not within acceptable range, or conflicts with other parameters. Row: cmd.parameters.Append cmd.createParameter ("@ Cust_Name", Adinteger, AdParaminput) Find a solution for half a day with Baidu, search for English website with Google:
(a) PUT <% OPTION Explicit%> at the top of your code (b) in case ado type library or adovbs.inc at the top of your.eg then add: dim cmdDim adCmdSPStoredProcDim adParamReturnValueDim adParaminputDim adParamOutputDim adIntegerDim iValDim oValDim adoFieldDim adVarChar 'these values are pre-in VB Define constants, can be called directly, but there is no predefined adcmdspstoredproc = 4adparamreturnValue = 4ADPARCHAR = 200 IVAL = 5OVAL = 3
execution succeed