Error with calling stored procedure from an asp pa

Results 1 to 2 of 2

Thread: Error with calling stored procedure from an asp pa

  1. #1
    Join Date
    Dec 1969

    Default Error with calling stored procedure from an asp pa

    I have a problem with calling stored procedure from an asp page.<BR><BR>Here&#039;s with my code:<BR>------------------------<BR> set cmdupd=server.createobject("adodb.command")<BR> cmdupd.activeconnection = conn<BR> cmdupd.commandtext = "get_clrno"<BR> cmdupd.commandtype = adCmdStoredProc<BR> cmdupd.Parameters.Append cmdupd.CreateParameter("v_clrno",adVarChar,adParam Output)<BR> cmdupd.execute<BR> paramup = cmdupd.Parameters("v_clrno").Value<BR> response.write paramupd<BR><BR>The error shows:<BR>--------------------<BR>ADODB.Parameters (0x800A0E7C)<BR>Parameter object is improperly defined. Inconsistent or incomplete information was provided.<BR><BR>The error message pointed to line:<BR>cmdupd.Parameters.Append cmdupd.CreateParamete("v_clrno",adVarChar,adParamO utput)<BR><BR>Could anyone tell me what is going on?<BR>TQ

  2. #2
    Join Date
    Dec 1969

    Default No size given for varchar

    I think the message is telling you the truth: "...incomplete information was provided..."<BR><BR>How big a VARCHAR field did you expect it to create for the output? I don&#039;t think there&#039;s any default for varchar, so you must supply it:<BR><BR>cmdupd.Parameters.Append cmdupd.CreateParameter("v_clrno",adVarChar,adParam Output[hl="yellow"],80[/hl])<BR><BR>or whatever size you need?<BR><BR>The other possibility is the you forgot to #include, meaning that all those adXXXX variables are undefined.<BR><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