sending a string to an oracle stored procedure

Results 1 to 2 of 2

Thread: sending a string to an oracle stored procedure

  1. #1
    Join Date
    Dec 1969

    Default sending a string to an oracle stored procedure

    Hi <BR><BR>I&#039;m having trouble sending a string from asp to an oracle stored procedure where the value its expecting is a varchar. Anyone got any ideas what i&#039;m doing wrong. Heres the code for reference:<BR><BR>Set Comm = Server.CreateObject("ADODB.Command")<BR>Set comm.ActiveConnection = conn<BR>comm.commandtype=4 <BR>comm.commandtext = "fivestars.InsertOtherBettingPoints"<BR>set param = comm.Parameters<BR><BR>set param = comm.createparameter("pbetrule",3,1)<BR>comm.param eters.append param<BR>set param = comm.createparameter("paccountno",3,1)<BR>comm.par ameters.append param<BR><BR>Response.write BetRule<BR>Response.write AccNo<BR>Response.Write typename(accno)<BR><BR>comm("pbetrule") = cint(BetRule)<BR>comm("paccountno") = cstr(AccNo)<BR><BR>comm.execute()<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Ok you have to change a couple things

    here. This is assuming you are not returning anything. By the way, I would suggest passing yourself back an output parameter with pass/fail value.<BR><BR>Set Comm = Server.CreateObject("ADODB.Command")<BR>Set comm.ActiveConnection = conn<BR>comm.commandtext = "{fivestars.InsertOtherBettingPoints(?,?)}"<BR>com m.commandtype=1 &#039;***&#060;---use 1 (adCmdText) not 4<BR><BR>set par1 = comm.createparameter("pbetrule",3,1,cint(BetRule)) <BR>comm.parameters.append par1<BR><BR>&#039;***200 means varchar<BR>&#039;***1 means input variable<BR>&#039;***10 is the length ***change to your max length<BR>set par2 = comm.createparameter("paccountno",200,1,10,cstr(Ac cNo))<BR>comm.parameters.append par2<BR><BR>comm.execute()

Posting Permissions

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