Connecting Tech Pros Worldwide Forums | Help | Site Map

Arguments are of the wrong type, are out of acceptable range, or are in conflict with

Newbie
 
Join Date: May 2009
Posts: 2
#1: May 28 '09
Hello,

Please help me. I'm trying to call a sql procedure for each record in a recordset.
I'm getting this error :Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another and because my close to zero experience i don't know what's wrong. Thank you
Expand|Select|Wrap|Line Numbers
  1. Do while not rsResultsDetail.EOF
  2.  
  3.    Set cmd = Server.CreateObject("ADODB.Command")
  4.    cmd.ActiveConnection = conn
  5.    cmd.CommandText = "Delete_Nonconformities"
  6.    cmd.CommandType =adCmdStoredProc
  7.    cmd.Parameters.Append cmd.CreateParameter("@P_NONCONFORMITY_ID", adInteger, adParamInput) 
  8.    cmd.Parameters("P_NONCONFORMITY_ID") =rsResultsDetail("NonConformityID")
  9.    cmd.Execute
  10.  
  11.    rsResultsDetail.MoveNext
  12.  
  13. loop

jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#2: May 29 '09

re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with


Is the error coming from the sql client or from IIS (an ASP error)?
Newbie
 
Join Date: May 2009
Posts: 2
#3: May 29 '09

re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with


Well.... i don't think this is the problem , because it works if i do something like this:

sqlDelteNonconformity = "delete from Nonconformity where ID=" & rsResultsDetail("NonConformityID")
set rsDeleteNonconformity = Server.CreateObject("ADODB.Recordset")
rsDeleteNonconformity.Open sqlDelteNonconformity ,conn,1,2
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Posts: 2,690
#4: Jun 1 '09

re: Arguments are of the wrong type, are out of acceptable range, or are in conflict with


Is this error returned from the SQL client? I can't tell from your post, but it sounds like you have not sent the parameters correctly. For example, the stored procedure might be expecting an integer, but you are actually sending a string. Or perhaps it is expecting another parameter.

Jared
Reply