How To Retrieve ADO Recordset from Oracle Function Through ASP?+

Discussion in 'ASP General' started by One from, Nov 28, 2006.

  1. One from

    One from Guest

    I have a lot of Oracle function in packages and i would like use it in my ASP
    pages.
    With Oracle procedure it's all right.
    Sample like this
    ....
    set cn = Server.CreateObject("ADODB.Connection")
    connString = "Provider=MSDAORA.1;Data Source=<>;User ID=<>;Password=<>"
    cn.Open connString
    SQL = "{call test.test_asp({resultset 0, cResult})}"
    Set cmd = Server.CreateObject ("ADODB.Command")
    Set cmd.ActiveConnection = cn
    cmd.CommandText = SQL
    cmd.CommandType = 1 'adCmdText
    Set rs = Server.CreateObject ("ADODB.RecordSet")
    Set rs = cmd.Execute
    If NOT (rs.BOF and rs.EOF) Then
    Do while NOT rs.EOF
    <%=rs("dfcountry")%>
    <%=rs("dfname")%>
    rs.MoveNext
    LOOP
    End if
    ......
    And in package TEST i have
    PROCEDURE TEST_ASP(cResult IN OUT ResultCursor)
    IS
    BEGIN
    OPEN cResult FOR
    SELECT *
    FROM tcountry;
    END TEST_ASP;"

    I Hope You help me with similar call a function!!!
    --------------------------------------------------------
    For example, this is one
    FUNCTION test_fun
    RETURN resultcursor
    IS
    vres resultcursor;
    BEGIN
    OPEN vres FOR
    SELECT *
    FROM tcountry;
    RETURN vres;
    END test_fun;
     
    One from, Nov 28, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. nita
    Replies:
    1
    Views:
    898
    Saravana
    Nov 20, 2004
  2. Replies:
    0
    Views:
    1,337
  3. jobs
    Replies:
    0
    Views:
    877
  4. Chris
    Replies:
    2
    Views:
    205
    McKirahan
    Oct 7, 2005
  5. Chris
    Replies:
    0
    Views:
    86
    Chris
    Oct 6, 2005
Loading...

Share This Page