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

    Unanswered: help...Call Oracle Store Procedure

    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:49.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >i think that is due to a date parameter
    I would agree.
    Keep in mind that what is being passed into the SP are string variables; that happen to represent date values.
    When the strings don't match NLS_DATE_FORMAT, an error will result.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    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
  •