Results 1 to 10 of 20

Thread: DF-20.1 Stored Procedure Call

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    SW Connecticut/NY area

    Default DF-20.1 Stored Procedure Call

    DF-20.1 64-bit Postgres v12.x Windoze 10 ODBC driver

    I've created very simple tests of calling both a stored procedure and function using the code in the CallSp_Help procedure in the StoredProcedureODBC specialized code example. In Postgres I have a schema specifically for procedures and functions and I've specified the schema as described in the help.

    The test procedure is as simple as it gets and when called from within Postgres executes successfully, even with the body being blank.
    Replace procedure testProc()
    language plpgsql
    as $$
    -- variable declaration
    -- stored procedure body
    end; $$
    Send SQLSetProcedurename of hStmt "testproc" "rms4func"
    The problem in both cases that I've tried, procedure and function, I get the following error

    General error. 42P01 (1)--ERROR: relation "rms4func.testproc" does not exist;
    Error while preparing parameters testproc Connection handle = 31, Statement handle = 32

    Error: 12289
    Error Source = ODBC_DRV.ESQL.SQLCall

    MSG_SQLCALL (5233) - oObject (32) - at address 12042
    MSG_CALLTHESP (5350) - DESKTOP (2) - at address 13594
    MSG_DOCALLFUNCTION (5424) - DESKTOP (2) - at address 14146
    [start] - at address 14148
    The procedure in this case certainly does exist. Postgres is well known for throwing that error when it can't match the parameters being sent to the procedure but in this case there aren't any.

    Am I doing something wrong?
    Last edited by Bob Worsley; 4-Dec-2021 at 10:04 PM.
    Bob Worsley
    rlworsley at

    Do or do not. There is no try. — Yoda

Posting Permissions

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