Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    4

    Unanswered: help...Call Oracle Store Procedure by Asp Page

    I have the follow code in my asp page, but i get an error that i don't understand... i think that is due to a date parameter ... Somebody can give me a solution.

    <%

    Dim database
    Dim cmdStoredProc
    Dim rs
    Dim param

    V_matricola="100287"
    v_inizio=CDate("01/01/2005")
    v_fine=CDate("31/12/2005")
    v_causale="FER020"
    v_tipocont="G"

    set database = server.createobject("adodb.connection")
    database.ConnectionString="Driver={Microsoft ODBC for Oracle}; Server=FINANZIARIA; Uid=r00; Pwd=r00;"

    database.Open

    Set cmdStoredProc = Server.CreateObject ("ADODB.Command")
    Set cmdStoredProc.ActiveConnection = database

    cmdStoredProc.CommandText = "{ CALL rd_pk_diritti.calc_residuo(?, ?, ?, ?, ?,n_diritto ,n_riduzione ,n_fruito ,n_fruitopass ,n_residuo, p_errore) }"
    cmdStoredProc.CommandType = 1

    ' Create INPUT/OUTPUT PARAMETERS
    set param = cmdStoredProc.Parameters

    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(p_matric, 200, 1, 6, v_matricola)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(p_dtin, 7, 1, v_inizio)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(p_dtfin, 7, 1, v_fine)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(p_causale, 200, 1, 10, v_causale)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(v_tipocont, 200, 1, 1, v_tipocont)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(n_diritto, 3, 2)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(n_riduzione, 3, 2)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(n_fruito, 3, 2)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(n_fruitopass, 3, 2)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(n_residuo, 3, 2)
    cmdStoredProc.Parameters.Append cmdStoredProc.CreateParameter(p_errore, 200, 1, 10)


    Set rs = cmdStoredProc.Execute

    %>


    this is the error that i get

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
    Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.



    The describe of pl-sql procedure is:

    p_matric varchar2 in
    p_dtin date in
    p_dtfin date in
    p_causale varchar2 in
    v_tipocont varchar2 out
    n_diritto number out
    n_riduzione number out
    n_fruito number out
    n_fruitopass number out
    n_residuo number out
    p_errore varchar2 in out

    Thanks
    gialby
    Last edited by gialby; 10-04-05 at 06:50.

  2. #2
    Join Date
    Oct 2005
    Posts
    4

    Nls_format_date

    The NLS_FORMAT_DATE default is "GG-MON-YY"?

    i try to pass parameter in this format but i return the same error....


    v_inizio=#01-JAN-05#
    v_fine=#01-DEC-05#


    Somebody Help me...please

Posting Permissions

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