How to connect oracle package using ASP

Posted on 2009-04-24
Last Modified: 2013-12-18
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

Question by:jcuWM
    LVL 3

    Expert Comment

    LVL 3

    Accepted Solution


    Author Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now