using ADO Cmd Object with Sproc IN ASP ERROR

Results 1 to 2 of 2

Thread: using ADO Cmd Object with Sproc IN ASP ERROR

  1. #1
    Join Date
    Dec 1969

    Default using ADO Cmd Object with Sproc IN ASP ERROR

    Hey guys,<BR>WEll I have an ADO command object that doesnt want to execute. I get the following Error;<BR><BR>ADODB.Command (0x800A0BB9)<BR>Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.<BR>/match/pictures/uploadprocess4.asp, line 14<BR><BR><BR>My code is:<BR><BR>Dim Cmd<BR>set Cmd = Server.CreateObject("ADODB.Command")<BR>With Cmd<BR>.ActiveConnection = "DSN=AdultMatch; uid=xxx; pwd=xxx"<BR>.CommandText = "sp_InsertNewPicture" <BR>.CommandType = adCmdStoredProc &#039;Requires the file or typelib meta tag<BR>.Parameters.Append .CreateParameter("@ImageBlob", adLongVarBinary, adParamInput, , File.Binary)<BR>.Parameters.Append .CreateParameter("@filename", adChar, adParamInput, 50, File.filename)<BR>.Parameters.Append .CreateParameter("@filesize", adNumeric, adParamInput, , File.filesize)<BR>.Parameters.Append .CreateParameter("@description", adchar, adParamInput, 255, File.description)<BR>.Parameters.Append .CreateParameter("@hash", adchar, adParamInput, 50, hash)<BR>.Parameters.Append .CreateParameter("@userid", adchar, adParamInput, 15, userID)<BR>.Execute, , adExecuteNoRecords<BR>End With<BR>Message = Cmd.Parameters("Message")<BR>Set Cmd = Nothing<BR><BR><BR>The error is occuring on this line:<BR>.CommandType = adCmdStoredProc &#039;Requires the file or typelib meta tag<BR><BR>I do have at the top of my page the include of so I have no idea why this would be wrong.<BR><BR>PLeae help<BR>Mike M<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: using ADO Cmd Object with Sproc IN ASP ERROR

    Not sure why you would be getting an error on line 14, but I did notice that you haven&#039;t created your output parameter. With your code I would add:<BR><BR>.Parameters.Append .CreateParameter("@message", adVarChar, adParamOutput, 100)<BR><BR>The second and fourth parameters values are guesses so you should check to make sure they&#039;re what you want. <BR><BR>Marios Alexandrou<BR>Web and Desktop Software Consultant<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts