• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

How to connect oracle package using ASP

I do not have any experience in Oracle. I usually send my data into Access but  this app needs to go into Oracle. I have an Oracle procedure that I send my variables from an ASP form. My form has 7 variables and I sent just two to see if it works and it does. The code attached works with a procedure.

The problem I have is that I will need to attach to an Oracle package instead. The DBA has taken the working procedure and put it in a package.  
The package name is testasp2.insert_name.
I have 2 inputs: stvlendcode & stvlenddesc
I have 1 output: p_result
Set Conn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
Conn.Open "DSN=abcd;uid=username;pwd=pwd"
Set cmd = Server.CreateObject("ADODB.Command")
cmd.ActiveConnection = Conn
cmd.CommandType = 4
cmd.CommandText = "insert_name"
Set puser = cmd.CreateParameter("stvlendcode", 200, 1, 10, xusername)
Set ppass = cmd.CreateParameter("stvlenddesc", 200, 1, 30, xpassword)
cmd.Parameters.Append puser
cmd.Parameters.Append ppass

Open in new window

  • 2
1 Solution
jcuWMAuthor Commented:
Found 2 things out. First , the output was added as a variable and appended and secondly, the rights to the user of the DSN did not have sufficient rights.

It works now.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now