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 |
|
thiruna
Starting Member
41 Posts |
Posted - 2001-10-11 : 10:21:45
|
| anyone please clarify the following....i am using parameters in command object to feed in the datas required for stored procedure. dim dRS, dCMD Set dRS = Server.CreateObject("adodb.Recordset") Set dCMD = Server.CreateObject("adodb.Command") dCMD.ActiveConnection = datacon.GetConnectionString() dCMD.CommandText ="machine_beverage_new" dCMD.CommandType =adCmdStoredProc For i = 0 to totalrec_count dCMD.Parameters.Append dCMD.CreateParameter("machineid", adInteger, adParamInput, 4, machineid) dCMD.Parameters.Append dCMD.CreateParameter("bevid", adInteger, adParamInput, 4, bev_id(i)) dCMD.Parameters.Append dCMD.CreateParameter("bevkey", adInteger, adParamInput, 4, bev_key(i)) dCMD.Parameters.Append dCMD.CreateParameter("bevgram", adVarchar, adParamInput, 50,bev_gram(i)) dCMD.Parameters.Append dCMD.CreateParameter("bevgrind", adVarchar, adParamInput, 50,bev_grind(i)) dCMD.Parameters.Append dCMD.CreateParameter("bevincludeid", adBoolean, adParamInput, 1,bev_include_id(i)) set dRS = dCMD.Execute NextWhen executing these lines, only the first record is getting executed and thereafter it ends with a ASP error message "Microsoft OLE DB Provider for SQL Server (0x80040E14)Procedure or function machine_beverage_new has too many arguments specified."In the database, only one record been added...Is there any way to cancel the previously added parameter value or suggest me a very good solution....This may be a very simple mistake but i dont know what it is....!!!thanks in advancethiruthiruna@vsnl.com |
|
|
|
|
|
|
|