Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253

    Unanswered: Executing Stored Procedure

    I'm executing a stored procedure and getting the
    SQL0440N No authorized routine named
    "AMROBI2.CREATEAIMCONNECTION" of type "PROCEDURE
    " having compatible arguments was found.

    The schema exists, the stored procedure exists, the user executing the procedure has execute permissions on the procedure and also has insert, update, delete rights on the table being accessed in the stored procedure. I'm sending in the correct number of input parameters.

    I'm running Version 8, FixPak 3 on Windows.

    Here's the stored procedure body (pretty basic):
    CREATE PROCEDURE AMROBI2.CreateAIMConnection (IN decCHANNELSESSIONID DECIMAL(12,0),
    IN strBUSINESSLINE VARCHAR(24),
    IN strBRANCHID VARCHAR(24),
    OUT decAIMCONNECTIONID DECIMAL(12,0))
    ------------------------------------------------------------------------
    -- SQL Stored Procedure
    ------------------------------------------------------------------------
    LANGUAGE SQL
    RESULT SETS 1
    P1: BEGIN
    INSERT INTO AMROBI2.AIMCONNECTION (ChannelSessionID, BusinessLine, BranchID, StartDateTime)
    VALUES
    (decCHANNELSESSIONID, strBUSINESSLINE, strBRANCHID, CURRENT TIMESTAMP);
    SET decAIMCONNECTIONID = IDENTITY_VAL_LOCAL();
    END P1

    Here's how I'm calling it:

    CALL AMROBI2.CREATEAIMCONNECTION (5, 'TEST', 'TEST');

    What gives????
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

  2. #2
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253
    ...a quick aside:

    The proc runs fine if I run it through the Development Center.
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    You have a fourth parameter for OUT

    So you call should be

    CALL AMROBI2.CREATEAIMCONNECTION (5, 'TEST', 'TEST',?);


    HTH

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Feb 2002
    Location
    Minneapolis, MN
    Posts
    253
    Cool...thanks!!!!

    Appreciate the help...
    Anthony Robinson

    "If I'm curt with you, it's because time is a factor here. I think fast, I talk fast, and I need you guys to act fast if you want to get out of this. So, pretty please - with sugar on top..."

Posting Permissions

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